Skip to content

Commit cca307b

Browse files
Merge pull request #95 from geekidea/dev
Dev
2 parents 5fce156 + b103023 commit cca307b

37 files changed

+1049
-204
lines changed

CHANGELOG_TODO.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CHANGELOG TODO
2+
3+
## [V1.4]
4+
- 部门树形列表
5+
6+
## [V1.5]
7+
- 代码生成起优化,是否生成自定义update方法,生成version,deleted注解
8+
- 黑白名单,配置文件和数据库可配置,并缓存到Redis
9+
- Redis Cache注解使用
10+
- ok http工具类
11+
- Excel解析,导入导出
12+
- 项目代码遵循阿里代码规范优化
13+
- 字典表
14+
- 配置参数表
15+
- 上传文件附件表
16+
- Redis分布式锁
17+
- 接口限流,ip限流,频率限流
18+
- Shiro Redis缓存
19+
- ApplicationRunner
20+
21+
22+
## [V1.6]
23+
- Spring security集成
24+
- HikariCP

README-zh.md

+83-44
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="https://github.com/geekidea/spring-boot-plus">
3-
<img alt="spring-boot-plus logo" src="https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/logo.png">
3+
<img alt="spring-boot-plus logo" src="https://springboot.plus/img/logo.png">
44
</a>
55
</p>
66
<p align="center">
@@ -102,45 +102,44 @@ mvn clean package -Plocal
102102

103103
### 1. 创建数据库表
104104
```sql
105-
106105
-- ----------------------------
107-
-- Table structure for sys_user
106+
-- Table structure for foo_bar
108107
-- ----------------------------
109-
drop table if exists `sys_user`;
110-
create table sys_user
108+
DROP TABLE IF EXISTS `foo_bar`;
109+
CREATE TABLE `foo_bar`
111110
(
112-
id bigint not null comment '主键'
113-
primary key,
114-
username varchar(20) not null comment '用户名',
115-
nickname varchar(20) null comment '昵称',
116-
password varchar(64) not null comment '密码',
117-
salt varchar(32) null comment '盐值',
118-
remark varchar(200) null comment 'remark',
119-
status int default 1 not null comment '状态,0:禁用,1:启用',
120-
create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间',
121-
update_time timestamp null comment '修改时间',
122-
constraint sys_user_username_uindex
123-
unique (username)
124-
)
125-
comment '系统用户';
111+
`id` bigint(20) NOT NULL COMMENT '主键',
112+
`name` varchar(20) NOT NULL COMMENT '名称',
113+
`foo` varchar(20) DEFAULT NULL COMMENT 'Foo',
114+
`bar` varchar(20) NOT NULL COMMENT 'Bar',
115+
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
116+
`state` int(11) NOT NULL DEFAULT '1' COMMENT '状态,0:禁用,1:启用',
117+
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
118+
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
119+
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
120+
PRIMARY KEY (`id`)
121+
) ENGINE = InnoDB
122+
DEFAULT CHARSET = utf8mb4
123+
COLLATE = utf8mb4_general_ci COMMENT ='FooBar';
126124

127125
-- ----------------------------
128-
-- Records of sys_user
126+
-- Records of foo_bar
129127
-- ----------------------------
130-
INSERT INTO spring_boot_plus.sys_user (id, username, nickname, password, salt, remark, state, create_time, update_time)
131-
VALUES (1, 'admin', '管理员', '751ade2f90ceb660cb2460f12cc6fe08268e628e4607bdb88a00605b3d66973c', 'e4cc3292e3ebc483998adb2c0e4e640e', 'Administrator Account', 1, '2019-08-26 00:52:01', null);
132-
INSERT INTO spring_boot_plus.sys_user (id, username, nickname, password, salt, remark, state, create_time, update_time)
133-
VALUES (2, 'test', '测试人员', '751ade2f90ceb660cb2460f12cc6fe08268e628e4607bdb88a00605b3d66973c', '99952b31c18156169a26bec80fd211f6', 'Tester Account', 1, '2019-10-05 14:04:27', null);
128+
INSERT INTO foo_bar (id, name, foo, bar, remark, state, version, create_time, update_time)
129+
VALUES (1, 'FooBar', 'foo', 'bar', 'remark...', 1, 0, '2019-11-01 14:05:14', null);
130+
INSERT INTO foo_bar (id, name, foo, bar, remark, state, version, create_time, update_time)
131+
VALUES (2, 'HelloWorld', 'hello', 'world', null, 1, 0, '2019-11-01 14:05:14', null);
134132

135133
```
136134

135+
137136
### 2.使用代码生成器生成增删改查代码
138137
> 修改数据库信息
139138
140139
>修改组件名称/作者/数据库表名称/主键id
141140
142141
```text
143-
/src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java
142+
/src/test/java/io/geekidea/springbootplus/test/SpringBootPlusGenerator.java
144143
```
145144

146145
```java
@@ -169,7 +168,7 @@ public class SpringBootPlusGenerator {
169168

170169
// 组件作者等配置
171170
codeGenerator
172-
.setModuleName("system")
171+
.setModuleName("foobar")
173172
.setAuthor("geekidea")
174173
.setPkIdColumnName("id");
175174

@@ -195,7 +194,7 @@ public class SpringBootPlusGenerator {
195194
.setGeneratorMapperXml(true);
196195

197196
// 是否生成Shiro RequiresPermissions注解
198-
codeGenerator.setRequiresPermissions(true);
197+
codeGenerator.setRequiresPermissions(false);
199198

200199
// 是否覆盖已有文件
201200
codeGenerator.setFileOverride(true);
@@ -206,9 +205,7 @@ public class SpringBootPlusGenerator {
206205
// 需要生成的表数组
207206
// xxx,yyy,zzz为需要生成代码的表名称
208207
String[] tables = {
209-
"xxx",
210-
"yyy",
211-
"zzz",
208+
"foo_bar"
212209
};
213210

214211
// 循环生成
@@ -227,31 +224,30 @@ public class SpringBootPlusGenerator {
227224
> 生成的代码结构
228225
229226
```text
230-
/src/main/java/io/geekidea/springbootplus/system
227+
/src/main/java/io/geekidea/springbootplus/foobar
231228
```
232229

233230
```text
234-
└── system
231+
└── foobar
232+
├── controller
233+
│   └── FooBarController.java
235234
├── entity
236-
│   └── SysUser.java
235+
│   └── FooBar.java
237236
├── mapper
238-
│   └── SysUserMapper.java
237+
│   └── FooBarMapper.java
238+
├── param
239+
│   └── FooBarQueryParam.java
239240
├── service
240-
│   ├── SysUserService.java
241+
│   ├── FooBarService.java
241242
│   └── impl
242-
│   └── SysUserServiceImpl.java
243-
└── web
244-
├── controller
245-
│   └── SysUserController.java
246-
├── param
247-
│   └── SysUserQueryParam.java
248-
└── vo
249-
└── SysUserQueryVo.java
243+
│   └── FooBarServiceImpl.java
244+
└── vo
245+
└── FooBarQueryVo.java
250246
```
251247

252248
> Mapper XML
253249
```text
254-
/src/main/resources/mapper/system/SysUserMapper.xml
250+
/src/main/resources/mapper/foobar/FooBarMapper.xml
255251
```
256252

257253
### 3. 启动项目
@@ -350,6 +346,49 @@ sh deploy.sh
350346
tail -f -n 1000 /root/spring-boot-plus-server/logs/spring-boot-plus.log
351347
```
352348
349+
350+
## spring-boot-plus Views
351+
352+
### spring-boot-plus IDEA Sources Views
353+
354+
![spring-boot-plus-idea](https://spring-boot-plus.gitee.io/img/home/spring-boot-plus-idea.png)
355+
356+
### [Spring Boot Admin Instances](http://47.105.159.10:8888/instances/e211ba082db8/details)
357+
<p>
358+
<a href="http://47.105.159.10:8888/instances/e211ba082db8/details">
359+
<img src="https://spring-boot-plus.gitee.io/img/home/spring-boot-admin.png" alt="spring-boot-admin instances">
360+
</a>
361+
</p>
362+
363+
### [Spring Boot Admin Statistics](http://47.105.159.10:8888/instances/e211ba082db8/details)
364+
<p>
365+
<a href="http://47.105.159.10:8888/instances/e211ba082db8/details">
366+
<img src="https://spring-boot-plus.gitee.io/img/home/spring-boot-admin-1.png" alt="spring-boot-admin statistics">
367+
</a>
368+
</p>
369+
370+
### [Spring Boot Admin Log](http://47.105.159.10:8888/instances/e211ba082db8/logfile)
371+
<p>
372+
<a href="http://47.105.159.10:8888/instances/e211ba082db8/logfile">
373+
<img src="https://spring-boot-plus.gitee.io/img/home/spring-boot-admin-log.png" alt="spring-boot-admin log">
374+
</a>
375+
</p>
376+
377+
### [spring-boot-plus Swagger文档](http://47.105.159.10:8888/swagger-ui.html)
378+
<p>
379+
<a href="http://47.105.159.10:8888/swagger-ui.html">
380+
<img src="https://spring-boot-plus.gitee.io/img/home/spring-boot-plus-swagger.png" alt="spring-boot-plus swagger docs">
381+
</a>
382+
</p>
383+
384+
### [spring-boot-plus Java Api Docs](http://geekidea.io/spring-boot-plus-apidocs/)
385+
<p>
386+
<a href="http://geekidea.io/spring-boot-plus-apidocs/">
387+
<img src="https://spring-boot-plus.gitee.io/img/home/spring-boot-plus-java-apidocs.png" alt="spring-boot-plus Java Api Docs">
388+
</a>
389+
</p>
390+
391+
353392
## spring-boot-plus 视频 :movie_camera:
354393
- [5分钟完成增删改查](https://www.bilibili.com/video/av67401204)
355394
- [CentOS 快速安装 JDK/Git/Maven/Redis/MySQL](https://www.bilibili.com/video/av67218836/)

0 commit comments

Comments
 (0)