27
27
## Purpose
28
28
> Everyone can develop projects independently, quickly and efficiently!
29
29
30
- ## Docs
30
+ ## Repository
31
31
#### [ GITHUB] ( https://github.com/geekidea/spring-boot-plus ) | [ GITEE] ( https://gitee.com/geekidea/spring-boot-plus )
32
32
33
- #### Website:[ springboot.plus] ( http://springboot.plus " springboot.plus ")
33
+ #### Website
34
+ #### [ springboot.plus] ( http://springboot.plus " springboot.plus ")
34
35
35
36
# Architecture
36
37
![ spring-boot-plus-architecture.jpg] ( https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/spring-boot-plus-architecture.jpg )
37
38
38
-
39
39
## Features
40
40
- Integrated spring boot common development component set, common configuration, AOP log, etc
41
41
- Integrated mybatis-plus fast dao operation
48
48
- Integrated Spring Boot Admin, real-time detection of project operation
49
49
- Integrate maven-assembly-plugin for different environment package deployment, including startup and restart commands, and extract configuration files to external config directory
50
50
51
-
52
51
### Project Environment
53
52
Middleware | Version | Remark
54
53
-|-|-
@@ -88,7 +87,82 @@ cd spring-boot-plus
88
87
mvn clean package -Plocal
89
88
```
90
89
91
- ### Project Main Class
90
+
91
+ ## 5 Minutes Finish CRUD
92
+
93
+ ### 1. Create Table
94
+ ``` sql
95
+ -- ----------------------------
96
+ -- Table structure for sys_user
97
+ -- ----------------------------
98
+ drop table if exists ` sys_user` ;
99
+ create table sys_user (
100
+ id bigint not null comment ' id' ,
101
+ name varchar (20 ) null comment ' name' ,
102
+ account varchar (20 ) not null comment ' account' ,
103
+ pwd varchar (20 ) not null comment ' password' ,
104
+ remark varchar (200 ) null comment ' remark' ,
105
+ create_time timestamp default CURRENT_TIMESTAMP null comment ' create time' ,
106
+ update_time timestamp null comment ' update time' ,
107
+ primary key (` id` ),
108
+ constraint sys_user_account_uindex
109
+ unique (account)
110
+ ) comment ' SystemUser' ;
111
+ -- ----------------------------
112
+ -- Records of sys_user
113
+ -- ----------------------------
114
+ INSERT INTO sys_user (id, name, account, pwd, remark, create_time, update_time) VALUES (1 , ' Administrator' , ' admin' , ' 123456' , ' Administrator Account' , ' 2019-08-26 00:52:01' , null );
115
+
116
+ ```
117
+
118
+ ### 2. Generator CRUD CODE
119
+ > Modify database info
120
+
121
+ > Modify module name / author / table name / primary key id
122
+
123
+ ``` text
124
+ /src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java
125
+ ```
126
+
127
+ ``` java
128
+ /**
129
+ * spring-boot-plus Code Generator
130
+ * @author geekidea
131
+ * @date 2018-11-08
132
+ */
133
+ public class CodeGenerator {
134
+ private static final String USER_NAME = " root" ;
135
+ private static final String PASSWORD = " root" ;
136
+ private static final String DRIVER_NAME = " com.mysql.jdbc.Driver" ;
137
+ private static final String DRIVER_URL = " jdbc:mysql://localhost:3306/spring_boot_plus?useUnicode=true&characterEncoding=UTF-8&useSSL=false" ;
138
+ // CODE...
139
+ // ############################ Config start ############################
140
+ // Module name
141
+ private static final String MODULE_NAME = " system" ;
142
+ // Author
143
+ private static final String AUTHOR = " geekidea" ;
144
+ // Table name
145
+ private static final String TABLE_NAME = " sys_user" ;
146
+ // Primary key id
147
+ private static final String PK_ID_COLUMN_NAME = " id" ;
148
+ // Generator strategy. true:All / false:SIMPLE
149
+ private static final boolean GENERATOR_STRATEGY = true ;
150
+ // Pagination list query Whether to sort. true:sort/false:non
151
+ private static final boolean PAGE_LIST_ORDER = false ;
152
+ // ############################ Config end ############################
153
+
154
+ public static void main (String [] args ) {
155
+ // Run...
156
+ }
157
+ }
158
+ ```
159
+
160
+ ### 3. Startup Project
161
+ > Project Main Class
162
+ ``` text
163
+ /src/main/java/io/geekidea/springbootplus/SpringBootPlusApplication.java
164
+ ```
165
+
92
166
``` java
93
167
/**
94
168
* spring-boot-plus Project Main Class
@@ -114,6 +188,13 @@ public class SpringBootPlusApplication {
114
188
}
115
189
```
116
190
191
+ ### 4. Access project swagger docs
192
+ [ http://127.0.0.1:8888/swagger-ui.html ] ( http://127.0.0.1:8888/swagger-ui.html )
193
+
194
+ ### 5. SysUser CRUD Swagger
195
+ ![ sys_user_swagger.png] ( https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/sys_user_swagger.png )
196
+
197
+
117
198
## Quick Start
118
199
[ Quick Start] ( https://springboot.plus/guide/quick-start.html )
119
200
0 commit comments