项目作者: ericmore

项目描述 :
SpringBoot+MyBatis+Shiro+Redis+MySQL
高级语言: Java
项目地址: git://github.com/ericmore/SpringMyBatisShiro.git
创建时间: 2018-05-29T09:51:52Z
项目社区:https://github.com/ericmore/SpringMyBatisShiro

开源协议:

下载


SpringMyBatisShiro

  • 项目启动后输入:http://localhost/
  • 该项目中, 增加了对url的拦截URLPermissionsFilter
  • 用admin/123456,拥有index权限reports未任何权限, lance/123456尚未分配任何权限.
  • 参考schema.sql
  • shiro Cache交于Redis进行管理
  • SpringBoot整合A.CTable 配置 源代码
  • 本项目配合Angular 2+ ,实现SPA(single page applications)的CROS认证控制

启动环境

安装mysql 5.7.x community server

  1. cd C:\software\mysql-5.7.22-winx64\
  2. mysqld --initialize
  3. mysqld -install
  4. 开启MySQL服务:net start mysql
  5. root用户登录MySQLmysql -u root -p
  6. 登录密码:(输入临时密码)
  7. 修改mysql root密码为1234
  8. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1234');
  9. CREATE DATABASE ipan

安装redis

下载链接,windows版本,无需设置密码 download

Web端使用Angular 2 源代码链接

MyBatis自动生成表结构参考代码

  1. Sample Entity
  2. @Table(name = "test")
  3. public class Test extends BaseModel{
  4. private static final long serialVersionUID = 5199200306752426433L;
  5. @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
  6. private Integer id;
  7. @Column(name = "name",type = MySqlTypeConstant.VARCHAR,length = 111)
  8. private String name;
  9. @Column(name = "description",type = MySqlTypeConstant.TEXT)
  10. private String description;
  11. @Column(name = "create_time",type = MySqlTypeConstant.DATETIME)
  12. private Date create_time;
  13. @Column(name = "update_time",type = MySqlTypeConstant.DATETIME)
  14. private Date update_time;
  15. @Column(name = "number",type = MySqlTypeConstant.BIGINT,length = 5)
  16. private Long number;
  17. @Column(name = "lifecycle",type = MySqlTypeConstant.CHAR,length = 1)
  18. private String lifecycle;
  19. @Column(name = "dekes",type = MySqlTypeConstant.DOUBLE,length = 5,decimalLength = 2)
  20. private Double dekes;
  21. }