当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 167

bconline / fhs-framework
暂停

forked from fhs_opensource / fhs-framework 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
LGPL-3.0

FHS-Framework 简介

fhs-framwork是一个集成了国内外诸多优秀开源项目的快速开发平台,除了在常规快速开发平台提供 用户,角色,权限,菜单,字典,操作日志,代码生成器 等功能的基础上,还在以下方面为您的快速开发做出了努力。

2.0升级日志:

  fhs-framework升级到了2.0,springboot和springcloud,jetcache,apollo 等依赖都进行了大版本升级和之前的项目可能会有些不兼容,如果需要之前版本请移步:https://gitee.com/fhs-opensource/fhs-framework/blob/v1.0.2
  a 升级springboot版本为2.2.5 cloud版本升级到:Hoxton.SR1
  b jetcache升级到2.5.16 并且使用lettuce连接redis
  c shedlock升级到4.3 apollo client升级到了1.5
  d 去掉了自定义的spring cache  manager定义,后续缓存统一使用jetcache
  e 支持Apollo动态变更日志级别
  f logback_fhs.xml 改为了logback-spring.xml

1. 项目基础框架搭建期

    导入一份sql,copy一个pom稍作修改,copy3个配置文件稍作修改,copy一个springboot启动类稍作修改即可完成框架搭建。

2. DB接入方面

-     减少手写sql

        fhs 使用了Mybatis Jpa+Mybatis Plus 框架来帮大家自动生成常见sql,Mybatis Jpa是fhs-opensource下的一款基于Mybatis的JPA的实现,为了补足复杂sql的生成,Mybatis Jpa 又对Mybatis Plus做了兼容,可以使用Mybatis Plus的注解来实现sql自动生成,有了Mybatis Jpa+Mybatis Plus 实现80%的单表查询无需写一行sql的效果

-     数据源路由

        通过简单的配置即可实现分库,分表,读写分离操作。

-     声明式事物

         add,update,del,save 开头的service方法,会默认开启事物,自定义部分请使用注解。

-     数据权限控制

         通过简单的配置即可实现组合或者单一数据权限控制

3. 日常业务方面

-     大量的base类使用

        通过继承即可完成大部分CRUD操作。

-     提供常见的工具类

        日期,日志,反射,网络,校验,文件等等。

-     其他

        统一验证框架处理器,统一异常处理器,控制器返回数据json字段过滤器,xss,csrf拦截器等等

4. 前端封装

-     给Easyui,Jquery Validform,My97做了整容手术

        Easyui是一款颜值稍低但是功能强大上手容易开发效率极高的UI框架,为了让其能不被大家抛弃,继续让他发光发热,我们为其定制了一套BootStrap皮肤,效果堪比Layui。

-     使用Beetl标签技术对常见的表单控件做了封装

        后台程序员有句俗话叫做后端10分钟,前端2小时。前端是很多人不愿意碰触的,于是有了很多公司一个项目要招聘2波人,后端专门写后端,前端专门写前段,但是明明一个人就能搞定的事情,非得要2个人?使用fhs的标签,所有的控件做到了统一化,不需要自己写js去初始化,去做校验,去赋值,只要使用了标签,标签中初始化,布局html,赋值,获取值,校验的js就都包含了,很大程度上降低了前端的学习和使用成本。

-     一款帮你写代码的引擎-PAGEX

        使用市面上的代码生成器,你做一个CRUD的需要多久呢?如果加上Excel导出,校验,列点击排序这些功能呢?如果要加数据权限,分库,支持多租户呢?要写多少后台代码,写多少sql,写多少js和html?使用pagex,你只需要定义一个JS,你需要的java类框架在运行期(非生成到硬盘上噢)直接给你编译为class扔到classLoader了,Html JS SQL 后台接口 按照指定的路径请求引擎也帮你自动生成,而你无需担心JS被暴露,因为JS仅仅被PAGEX引擎加载当做配置文件用的,既然是配置文件为何选择JS呢?第一:JAVA有JS引擎,可以执行JS代码;第二:JS中有JSON格式,做配置比XML和YML方便,比Properties强大;第三:很多CRUD我们需要自己写一些JS方法,来控制一些插件的隐藏显示以及一些前端业务,把他们写到JS文件中总比写到XML中强很多倍吧。

        PAGEX可以通过简单的配置自动生成CRUD代码,可实现导入,字段排序,数据权限,租户权限,字典翻译,表关联,各类表单插件一行json配置等功能,更让人惊喜的是,pagex的js可以通过Idea 的EasyCode插件自动生成,然后稍作改动就可以使用了。

        下面是使用PAGEX引擎的一个我们项目中月租户类型管理的demo


    var modelConfig= {title:'月租户类型',pkey:'id',type:'uuid',orderBy:'update_time Desc',
        namespace:"parking_lease_type",table:'t_park_lease_type',trans:true,db:"park"};
    
    var listPage={
        listFieldSett:function(){
    	  return [
    		  {name:'lease_name',title:'类型名称',width:'20%',align:'center'},
              {name:'park_id',title:'停车场名称',width:'20%',isJoin:true,namespace:'parking',showField:'transMap.parkName',align:'center'},//自动表关联
              {name:'is_disable',title:'是否禁用',width:'10%',formart:'formatRowColor',align:'center',trans:'book',key:'is_disable',showField:'transMap.is_disableName'},//字典翻译
              {name:'create_user',title:'创建人',width:'8%',align:'center',trans:'user',showField:'transMap.create_userUserName'},//用户翻译
              {name:'create_time',title:'创建时间',width:'10%',align:'center'},
              {name:'update_user',title:'更新人',width:'8%',align:'center',trans:'user',showField:'transMap.create_userUserName'},
              {name:'update_time',title:'更新时间',width:'10%',align:'center'},
              {name:'is_sync',title:'是否已下发',width:'5%',align:'center',trans:'book',key:'yesOrNo',showField:'transMap.is_syncName'},//字典翻译
      ]},
      isColumnButton:function(){
    	  return  false;
      },
      filters:function(){
          return [
              {name:'park_id',type:'select',url:'${path.basePath}/ms/x/parking/findListData',
                  valuefield:'id',textfield:'parkName',title:'停车场'},//下拉插件
              {name:'lease_name',type:'input',title:'出入口名称',filterType:'like'},
    	  ];      
      }, 
      buttons:function(){
          return [
              //自定义按钮数组
          ];
      },
      disableButtons:function(){
    	    return [];//禁用掉默认提供的按钮 默认提供了增删改查 + 导出
      },
      otherFunctions:function(){
          return {}//其他的自定义方法
      }
    };
    
    var add={ 
    	formFields:function(){//表单内容
    	     return [
                 {name:'park_id',type:'select',url:'${path.basePath}/ms/x/parking/findListData',
                     valuefield:'id',textfield:'parkName',title:'停车场',required:true,},//一个下拉
                 {name:'lease_name',title:'名称',required:true,type:'input'},//一个input
                 {name:'is_disable',title:'是否禁用',type:'switch',dft:false},//一个开关滑块
                 {name:'is_sync',title:'是否下发',type:'hide'},//一个隐藏域
    		 ];
    	},
        otherFunctions:function(){
          return {
    	     ready:function(){
    	    },
    	    loadSuccess:function(info){//加载后台数据成功的事件
    
    	    },
    	    onSave:function(){//保存前执行方法
                $('#isSync').val(0);
    	    },
    		saveSucess:function(){//保存成功执行方法
    	    },
    		saveError:function(){//保存失败执行的方法
    		    
    	    },
    	  }		
       }
    }

5. 翻译服务

    翻译服务用于根据表中存放的id来翻译出对应的文字给做客户做显示使用,系统默认实现对省市区,后台用户,部门,字典的翻译支持,您通过简单的几行js配置即可把自己的表维护的翻译服务中,翻译服务使用进程缓存,当数据有更新的时候会自动重新加载(支持分布式),有着很高的效率,可减少表关联sql的书写。

    自定义表加入到翻译服务demo(使用pagex方法):

var modelConfig= {title:'停车场',pkey:'id',type:'uuid',orderBy:'update_time Desc',
  namespace:"parking",table:'t_park_parking',trans:true,extendsParam:'parent_park_id=${param.parent_park_id}',
  joinColumns:JSON.stringify({park_name:'parkName'}),db:"park",dp:JSON.stringify({id:'parkIds'}),isMultiTenant:true};

    使用:

   {name:'park_id',title:'停车场名称',width:'20%',trans:'pagex',key:'parking',showField:'transMap.parkName',align:'center'},//自动表关联

    或者在java代码中使用

      @Trans(type="pagex",key="parking")
	  private String parkId;

6. c端支持

    支持微信,支付宝 用户自动登陆接入。

7.支持分布式和单机部署模式

    项目集成了分布式模式和单机模式2种模式,分布式模式依赖比较多,需要安装apollo(分布式配置中心),CAS,redis,启动文件服务jar包,静态文件jar包,eureka jar包。 单机模式,可以把文件服务的依赖,静态文件的依赖,都添加到自己项目的依赖中,可以不依赖apollo,使用本地配置文件启动。。

技术栈

  • 前端:Easyui(美化过的Easyui),Layui(首页),Validform,My 97(定制过主题)。
  • 后端校验:hibernate vilidator。
  • 后端:SpringBoot 2.2.5 + Springcloud(可选)
  • ORM:Mybatis(基础)+JPA(一对一&一对多查询,数据权限注解)+Plus(条件查询器)
  • 模板引擎:beetl+JSP
  • 无后端业务的快速开发引擎:PAGEX
  • 分布式配置:Apollo
  • 缓存:jetcache+spring data cache
  • 分布式任务:shedlock

使用说明

    1. 早期写的部分 文档 http://114.116.20.119/ (建设中)

    2 新出炉的文档 https://gitee.com/fhs-opensource/fhs-framework/wikis/pages

参与贡献获取技术支持

官方QQ 群:976278956

体验地址:http://114.116.20.119:8081/ admin 123456

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

一个基于Springboot的快速开发平台,除了常见的权限,字典,操作日志等功能外,提供了通过js做配置文件在运行时自动生成java类加载到classloader中的行业新特性,简单的接口和crud页面只需配置无需自己写java和sql 展开 收起
Java
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/liujunsong/fhs-framework.git
git@gitee.com:liujunsong/fhs-framework.git
liujunsong
fhs-framework
fhs-framework
master

搜索帮助

14c37bed 8189591 565d56ea 8189591