{"repo":"Janche/springboot-security-project","free":true,"listed":false,"github":"https://github.com/Janche/springboot-security-project","clone":"git clone https://github.com/Janche/springboot-security-project.git","description":"脚手架工程(springboot + springsecurity + mybatis + redis + swagger + oauth2)，内含freemarker的代码生成器","language":"Java","stars":116,"topics":["springboot2","spring-security-oauth2","spring-boot2-security-oauth","springboot-mybatis-admin","springboot-security-project","springboot-security","oauth2","freemarker","swagger2","mapper-plugin"],"license":null,"category":"auth-billing-email","readme_excerpt":"## springboot-security-project 基于 springboot2 + springsecurity + mybatis + redis + swagger + oauth2 的脚手架工程(前后端分离) 1. 配置了mybatis的通用mapper，单表操作无需写SQL，实现了批量插入、批量删除等功能。 2. 内含freemarker的代码生成器，可以一键根据表名直接生成controller、service、dao、mapper等基础代码， 大大提高了开发效率，让你更专注于对业务的开发。 3. spring-security目前使用的是基于权限的动态校验，采用黑名单的方式对接口权限的判断。 4. 框架内已包含许多工具类，MD5加密、json、POI的excel文档操作，以及时间和日期等常见工具类。 5. 采用了@Log对项目日志的记录。 6. 接口文档地址：http://localhost:9999/doc.html (采用knife4j的文档风格) 7. 加入对OAuth2的支持，这部分代码目前已迁移到oauth2分支 （博客地址） 依赖 版本 :------------- :------------ Spring Boot 2.1.8.RELEASE Spring Web MVC 5.1.9.RELEASE Spring Security Web 5.1.5.RELEASE MyBatis 4.1.5 通用mapper 2.1.5 Druid 1.1.21 启动步骤 1. 创建数据库boot2-oauth, 执行web模块下resources/sql/init.sql文件 2. 使用postman测试登录接口 /login POST 方式 ，本项目返回均是JSON字符串，重定向到登录页面，需要前端做处理，若想要后端直接重定向到登录页面的话，需要配置WebSecurityConfig中引入的那几个Handler，将里面返回的json值改为重定向到登录页面即可。 温馨提示 1. 可根据项目需要自定义 backend/src/test/resources/generator/template/ 目录下的模板文件 2. 定义好表结构后，配置 backend/src/test/java/CodeGenerator.java 这个文件，运行即可生成项目的基础代码 完成模块 1. 用户管理 - [x] 用户的CRUD - [x] 在线用户数量统计 2. 角色管理 - [x] 角色的CRUD - [x] 角色权限树 3. 权限管理 - [x] 权限的CRUD 4. 日志管理 - [x] 日志的CRUD OAuth2 授权码和password测试如下：","default_branch":null,"files":null,"tree":[],"storefront":"/r/Janche","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Janche/springboot-security-project/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}