SpringBoot template out of the box
preface
If you are engaged in the development of the independent development of a complete project, we need to do a lot of the development of the preparation, especially when using more technology stack, we will put more early component debugging time, in fact this part of the work often is not involved in the business, could the common technology stack gather together to do a template development, This blog provides a template for a SpringBoot project that does not involve business logic.
See my blog: Out of the box Dubbo Templates
The body of the
SpringBoot template out of the box
Here’s a quick look at the technology stack for the project
- Rights management:
SpringSecurity
- Logging system:
Log4j2
- Distributed scheduled Task:
Elastic job
- Excel import and Export:
Easy Excel
- No database:
Redis
- The message queue:
RabbitMq
- Interface online tool:
Knife4j
- The database:
Mysql
- ORM object mapping framework:
Mybatis
In addition to the technical stack above, there are some other tools that are not described here, directly on the dry goods!
Preliminary preparation of the project
The following preparations need to be made before running the project:
- The installation
mysql
And execute the supplied database script - The installation
redis
The database - The installation
zookeeper
- The installation
rabbitmq
Message server
Install these tools on your own.
IDEA After opening the project, modify the configuration file
application-test.propertiesInvolved:mysql
,redis
andrabbitmq
address
elastic-job.xmlInvolved:zookeeperaddress
Technical points in the project
- SpringBoot+Redis implementation data Dictionary: refer to my blog for details, SpringBoot+Redis implementation data dictionary
- SpringBoot uses custom annotations to print logs: See my blog for details. SpringBoot uses custom annotations to print logs
- EasyExcel Excel file import and export: details can refer to my blog, EasyExcel Excel file import and export
- SpringBoot uses validation-api to validate parameters: See my blog for details. SpringBoot uses validation-api to validate parameters
- SpringBoot uses KNIfe4J for online interface debugging: See my blog for more details. SpringBoot uses Knife4J for online interface debugging
- Elastic-job Implements distributed scheduled tasks: See my blog for details. Elastic-job implements distributed scheduled tasks
- Java uses custom annotations to gracefully resolve exceptions: See my blog on How Java uses custom annotations to gracefully resolve exceptions
- SpringBoot uses RabbitMQ: See my blog for details. SpringBoot uses RabbitMQ
- SpringBoot uses Spring Security for permission management: Refer to my blog, SpringBoot uses Spring Security for permission management
- SpringBoot implements file cloud storage using Ali OSS: refer to my blog, SpringBoot implements file cloud storage using Ali OSS
validation
Since the project no front part, but the configuration knife4j, visit http://127.0.0.1:8080/doc.html to enter knife4j UI interface:
The source code
The project source code is available from my Github: github source address