The recommended diboot in this issue is designed to write less, perform better, and is a low-code development platform for developers. Correlation no SQL, 10 times higher performance, front and back end code visual generation and other all-round capabilities!
diboot design concept
- Web development needs a universal basic framework to simplify complex problems, preferably with better performance, and avoid common pitfalls
- Programmers are hard to replace, but programmers should focus on data structure design, business implementation, difficulty solving, and repetitive CRUD will not improve
- Low code is the future trend, CRUD class repetitive regular work can be automated or even eliminated
diboot Main technical stack
- Backend Java + relational database, closely follow the Spring system (Spring Boot, Spring Cloud)
- ORM station Mybatis, general Mapper framework uses Mybatis-plus
- Permissions: The spring boot version uses Shiro+JWT; The spring cloud version uses spring security + oauth2.
- Front and rear separation, front-end selection of Vue, support ElementUI and Antd vue pro
diboot component
- diboot-core: Compact optimized kernel: Write less, perform better
- IAM authentication infrastructure and VUE front-end framework (diboot-antd-admin, diboot-element-admin)
- diboot-file file processing component
- diboot-scheduler Scheduled task component
- diboot-message message notification component
- diboot-mobile
diboot-core (diboot-core-starter) Operation procedure
< Introducing dependencies
<dependency>
<groupId>com.diboot</groupId>
<artifactId>diboot-core-spring-boot-starter</artifactId>
<version>{latestVersion}</version>
</dependency>
或Gradle:
compile(“com.diboot:diboot-core-spring-boot-starter:{latestVersion}”)
2. Configuration parameters (Data source)
#datasource config
spring.datasource.url=jdbc:mysql://localhost:3306/diboot_example? characterEncoding=utf8& serverTimezone=GMT%2B8
spring.datasource.username=diboot
spring.datasource.password=123456
spring.datasource.hikari.maximum-pool-size=5
spring.datasource.hikari.driver-class-name=com.mysql.cj.jdbc.Driver
-------------------------------------------------------------------------
#diboot-core-spring-boot-starter Optional parameter configuration:
# Whether to initialize sql, default true, after initialization (or non-development environments) can be changed to false to turn off detection
diboot.core.init-sql=false
config class
diboot-core-starter presets the mybatis-plus pagination configuration by default (using the latest configuration of MybatisPlusInterceptor in mybatis-plus 3.4.x). If you rely on core-starter, you do not need to configure paging for mybatis plus again. If you need to add other interceptors, you need to redefine MybatisPlusInterceptor. Example :
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
return interceptor;
}
# Also, HttpMessageConverters is configured by default in core-starter. If you need to change the default configuration, you need to redefine HttpMessageConverters in the configuration class.
@Bean
public HttpMessageConverters jacksonHttpMessageConverters() {
...
}
Note: Diboot-core-starter presets the default configuration and interface implementation related to the dictionary table. If an old project relies only on diboot-core (non-diboot-core-starter), add the diboot package path to ComponentScan.
diboot Novice experience
1. Clone the playground project in the IDE
“File -> New -> Project from version control…” Menu Opens the Clone Project dialog box :
Enter the following path of playground project in the URL, specify the local path of the project (avoid Chinese path), and click the Clone button
:https://gitee.com/dibo_software/playground.git
After the clone is complete, in the Maven view on the right, add pom.xml
under the demo project.
Use devtools to initialize code after preparing the database
- Click the URL printed in the console to enter the devtools operation page. (Individual users need to scan the code for the first time)
- Starting devtools for the first time prompts you to initialize the basic code of the component (to facilitate custom modifications, devtools generates code such as controller into a local project). Click the Generate Code button for each component in turn.
- Open the java directory under the demo directory and you will see that the initialization code for the relevant components has been generated.
Note: If the startup front end finds that the verification code cannot be displayed, you need to check whether this step was performed and restart the project. The controller associated with login authentication needs to generate
in this step