/jiujiu-security

A set of permission systems developed using SpringBoot, MyBatis, and Shiro frameworks, with a very low threshold and ready to use. At the beginning of the design, we paid great attention to security and escorted the enterprise system, making everything so simple.

Primary LanguageJavaScript

Project instruction

  • A set of permission systems developed using SpringBoot, MyBatis, and Shiro frameworks, with a very low threshold and ready to use. At the beginning of the design, we paid great attention to security and escorted the enterprise system, making everything so simple.
  • Provide a code generator, just write about 30% of the code, the rest of the code is automatically generated by the system, and the development task can be completed quickly.
  • Support for mainstream databases such as MySQL, Oracle, SQL Server, PostgreSQL

Features

  • Flexible access control, which can be controlled to pages or buttons to meet most of the permission requirements
  • Complete department management and data permissions, control of data permissions through annotations
  • Complete XSS prevention and script filtering to completely eliminate XSS attacks
  • Support distributed deployment, session storage in redis
  • Friendly code structure and comments for easy reading and secondary development
  • Introduce quartz timing tasks to dynamically add, modify, delete, pause, resume, and log views
  • Page interaction using Vue2.x, greatly improving development efficiency
  • Introduced swagger document support for easy writing API interface documentation

Data permission design ideas

  • Administrator management, role management, department management, operation of this department and sub-department data
  • Menu management, scheduled tasks, parameter management, dictionary management, system logs, no data permissions
  • Business function, query and operate data according to user data permission [no data permission of this department, can also query personal data]

Project structure

jiujiu-security
├─jiujiu-common  common module
│ 
├─jiujiu-admin   Management console
│    ├─db  SQL
│    │ 
│    ├─modules  modules
│    │    ├─job Timed task
│    │    ├─oss File storage
│    │    └─sys System management (core)
│    │ 
│    └─resources 
│        ├─mapper   MyBatis files
│        ├─statics  statices resources
│        ├─template System page
│        │    ├─modules      Module page
│        │    ├─index.html   AdminLTE Theme style(Default)
│        │    └─index1.html  Layui Theme style
│        └─application.yml   Global configuration file
│       
│ 
├─jiujiu-api  API module
│ 
├─jiujiu-generator  Code generator
│        └─resources 
│           ├─mapper   MyBatis configure file
│           ├─template Code generator template
│           ├─application.yml    Global configuration file
│           └─generator.properties   Code generator, configuration file
│

Technical selection:

  • Core framework:Spring Boot 2.1
  • Security framework:Apache Shiro 1.4
  • View frame:Spring MVC 5.0
  • Persistence layer framework:MyBatis 3.5
  • Timer:Quartz 2.3
  • Database connection pool:Druid 1.1
  • Log management:SLF4J 1.7、Log4j
  • Page interaction:Vue2.x

Software Requirements

  • JDK1.8 +
  • MySQL5.5+
  • Maven3.0+

Local deployment

  • Download source code via git
  • idea、eclipse need to install the lombok plugin, otherwise you will be prompted to find the get set method of the entity
  • Create the database jiujiu_security, the database code is UTF-8MB4
  • Execute db/mysql.sql file, initialize data [import table structure and data as needed]
  • Modify the application-dev.yml file to update the MySQL account and password
  • In the jiujiu-security directory, execute mvn clean install




  Cluster deployment

  • Cluster deployment, you need to install redis and configure redis information.
  • Need to configure [jiujiu.redis.open=true] to enable redis cache
  • Need to configure [jiujiu.cluster=true] to open the cluster environment

  Project Demo