Skip to content

Commit 9f43ae1

Browse files
Merge pull request #79 from geekidea/dev
Dev
2 parents 918f824 + f4fba82 commit 9f43ae1

File tree

100 files changed

+1592
-1189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1592
-1189
lines changed

CHANGELOG.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# 更新日志 CHANGELOG
22

3+
4+
## [V1.3.1-RELEASE] 2019.10.15
5+
6+
### ⭐️ New Features
7+
- Xss跨站脚本工具处理
8+
- CORS跨域配置
9+
10+
### ⚡️ Optimization
11+
- 代码生成器可自定义配置生成哪些文件
12+
- 请求路径filter配置,配置文件属性名称调整
13+
- Aop切点优化,`Aop` JSON参数输出优化
14+
- 可配置是否生成`Validation`验证代码
15+
- 优化`controller`,`entity`模版生成
16+
- 优化代码生成器 CodeGenerator
17+
- 调整 `aop`, `filter`,`interceptor`,`controller`,`param`,`vo`代码目录结构
18+
19+
### 📝 Added/Modified
20+
- Add `XssFilter`,`XssHttpServletRequestWrapper`,`XssJacksonDeserializer`,`XssJacksonSerializer`
21+
- Add `SpringBootPlusCorsProperties`
22+
- Update `JacksonConfig`
23+
- Update `LogAop`,`RequestPathFilter`,`ShiroConfig`
24+
25+
### 🐞 Bug Fixes
26+
- fix druid控制面板无法访问问题
27+
28+
### 📔 Documentation
29+
- [https://springboot.plus/guide/xss.html](https://springboot.plus/guide/xss.html)
30+
- [https://springboot.plus/guide/cors.html](https://springboot.plus/guide/cors.html)
31+
32+
### 🔨 Dependency Upgrades
33+
- Upgrade to `spring-boot` 2.1.9.RELEASE
34+
- Upgrade to `Fastjson` 1.2.62
35+
- Upgrade to `hutool` 4.6.10
36+
- Add `commons-text` 1.8
37+
338
## [V1.3.0-RELEASE] 2019.10.06
439

540
### ⭐️ New Features
@@ -60,7 +95,7 @@
6095
- [spring-boot-plus java docs](http://geekidea.io/spring-boot-plus-apidocs/)
6196

6297
### 🔨 Dependency Upgrades
63-
- Upgrade to `springboot` 2.1.8.RELEASE
98+
- Upgrade to `springboot` 2.1.9.RELEASE
6499
- Upgrade to `Mybatis` 3.5.2
65100
- Upgrade to `Mybatis Plus` 3.2.0
66101
- Upgrade to `Alibaba Druid` 1.1.20

README-zh.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
<p align="center">
1111
<a href="https://github.com/geekidea/spring-boot-plus/">
12-
<img alt="spring-boot-plus version" src="https://img.shields.io/badge/spring--boot--plus-1.3.0--RELEASE-blue">
12+
<img alt="spring-boot-plus version" src="https://img.shields.io/badge/spring--boot--plus-1.3.1.RELEASE-blue">
1313
</a>
1414
<a href="https://github.com/spring-projects/spring-boot">
15-
<img alt="spring boot version" src="https://img.shields.io/badge/spring%20boot-2.1.8.RELEASE-brightgreen">
15+
<img alt="spring boot version" src="https://img.shields.io/badge/spring%20boot-2.1.9.RELEASE-brightgreen">
1616
</a>
1717
<a href="https://www.apache.org/licenses/LICENSE-2.0">
1818
<img alt="code style" src="https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square">
@@ -58,8 +58,8 @@ Redis | 3.2+ | |
5858
### 技术选型
5959
技术 | 版本 | 备注
6060
-|-|-
61-
Spring Boot | 2.1.8.RELEASE | 最新发布稳定版 |
62-
Spring Framework | 5.1.9.RELEASE | 最新发布稳定版 |
61+
Spring Boot | 2.1.9.RELEASE | 最新发布稳定版 |
62+
Spring Framework | 5.1.10.RELEASE | 最新发布稳定版 |
6363
Mybatis | 3.5.2 | 持久层框架 |
6464
Mybatis Plus | 3.2.0 | mybatis增强框架 |
6565
Alibaba Druid | 1.1.20 | 数据源 |
@@ -73,7 +73,7 @@ reflections | 0.9.11 | 反射工具包 |
7373
hibernate-validator | 6.0.17.Final | 后台参数校验注解 |
7474
Shiro | 1.4.1 | 权限控制 |
7575
JWT | 3.8.3 | JSON WEB TOKEN |
76-
hutool-all | 4.6.4 | 常用工具集 |
76+
hutool-all | 4.6.10 | 常用工具集 |
7777
lombok | 1.18.8 | 注解生成Java Bean等工具 |
7878
mapstruct | 1.3.0.Final | 对象属性复制工具 |
7979

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
<p align="center">
1111
<a href="https://github.com/geekidea/spring-boot-plus/">
12-
<img alt="spring-boot-plus version" src="https://img.shields.io/badge/spring--boot--plus-1.3.0--RELEASE-blue">
12+
<img alt="spring-boot-plus version" src="https://img.shields.io/badge/spring--boot--plus-1.3.1.RELEASE-blue">
1313
</a>
1414
<a href="https://github.com/spring-projects/spring-boot">
15-
<img alt="spring boot version" src="https://img.shields.io/badge/spring%20boot-2.1.8.RELEASE-brightgreen">
15+
<img alt="spring boot version" src="https://img.shields.io/badge/spring%20boot-2.1.9.RELEASE-brightgreen">
1616
</a>
1717
<a href="https://www.apache.org/licenses/LICENSE-2.0">
1818
<img alt="code style" src="https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square">
@@ -60,8 +60,8 @@ Redis | 3.2+ | |
6060
### Technology stack
6161
Component| Version | Remark
6262
-|-|-
63-
Spring Boot | 2.1.8.RELEASE | Latest release stable version |
64-
Spring Framework | 5.1.9.RELEASE | Latest release stable version |
63+
Spring Boot | 2.1.9.RELEASE | Latest release stable version |
64+
Spring Framework | 5.1.10.RELEASE | Latest release stable version |
6565
Mybatis | 3.5.2 | DAO Framework |
6666
Mybatis Plus | 3.2.0 | mybatis Enhanced framework |
6767
Alibaba Druid | 1.1.20 | Data source |
@@ -75,7 +75,7 @@ reflections | 0.9.11 | Reflection Toolkit |
7575
hibernate-validator | 6.0.17.Final | Validator toolkit |
7676
Shiro | 1.4.1 | Permission control |
7777
JWT | 3.8.3 | JSON WEB TOKEN |
78-
hutool-all | 4.6.4 | Common toolset |
78+
hutool-all | 4.6.10 | Common toolset |
7979
lombok | 1.18.8 | Automatically plugs |
8080
mapstruct | 1.3.0.Final | Object property replication tool |
8181

deploy/deploy.sh

+19-9
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ else
4343

4444
if [[ ! $PULL_RESULT == *up-to-date* ]]
4545
then
46-
echo "Update code..."
46+
echo "update code..."
4747
IS_UPDATE=1
4848
fi
4949
fi
@@ -52,10 +52,18 @@ pwd
5252

5353
# 2. maven打包
5454
mvn clean
55-
mvn clean package -Ptest
55+
mvn package -Ptest
56+
57+
pwd
58+
# 判断是否生成成功
59+
if [ ! -f "target/spring-boot-plus-server-assembly.tar.gz" ]; then
60+
echo "maven build fail"
61+
exit
62+
fi
5663

5764
# 3. 停服
5865
cd ..
66+
pwd
5967

6068
if [ -d "spring-boot-plus-server" ]; then
6169
sh spring-boot-plus-server/bin/shutdown.sh
@@ -70,20 +78,22 @@ fi
7078

7179
if [[ $IS_UPDATE == 1 ]]
7280
then
73-
echo "Back spring-boot-plus-server..."
81+
echo "back spring-boot-plus-server..."
7482
mv spring-boot-plus-server spring-boot-plus-server-back/spring-boot-plus-server-back-"${NOW}"
83+
echo "back success"
7584
fi
7685

77-
echo "Copy spring-boot-plus-server-assembly.tar.gz..."
86+
echo "copy spring-boot-plus-server-assembly.tar.gz..."
7887
# 复制到项目同级目录,如果有,则覆盖
7988
cp -r -f spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
89+
echo "copy success"
8090

91+
pwd
8192
# 5. 运行spring-boot-plus
8293
tar -zxvf spring-boot-plus-server-assembly.tar.gz
83-
cd spring-boot-plus-server/bin
84-
sh restart.sh
94+
echo "tar.gz decompression success"
8595

86-
# 6. 访问项目
87-
# 输出项目日志
88-
# http://localhost:8888/docs
96+
pwd
97+
sh spring-boot-plus-server/bin/shutdown.sh
98+
sh spring-boot-plus-server/bin/startup.sh
8999

docs/db/mysql_spring_boot_plus.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ CREATE TABLE `ip` (
3232
`ip_start_num` bigint(20) NOT NULL,
3333
`ip_end_num` bigint(20) NOT NULL,
3434
PRIMARY KEY (`id`) USING BTREE
35-
) ENGINE = InnoDB AUTO_INCREMENT = 526718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
35+
) ENGINE = InnoDB AUTO_INCREMENT = 526718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'IP地址' ROW_FORMAT = Dynamic;
3636

3737
-- ----------------------------
3838
-- Table structure for sys_log

pom.xml

+19-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<groupId>io.geekidea</groupId>
2323
<artifactId>spring-boot-plus</artifactId>
24-
<version>1.3.0.RELEASE</version>
24+
<version>1.3.1.RELEASE</version>
2525
<packaging>jar</packaging>
2626

2727
<name>spring-boot-plus</name>
@@ -45,26 +45,26 @@
4545
<utf8>UTF-8</utf8>
4646
<project.build.sourceEncoding>${utf8}</project.build.sourceEncoding>
4747
<project.reporting.outputEncoding>${utf8}</project.reporting.outputEncoding>
48-
<project-parent.version>${parent.version}</project-parent.version>
4948
<java.version>1.8</java.version>
50-
<spring-boot.version>2.1.0.RELEASE</spring-boot.version>
49+
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
50+
<spring-boot-admin.version>2.1.6</spring-boot-admin.version>
5151
<mybatis-plus-boot-starter.version>3.2.0</mybatis-plus-boot-starter.version>
52-
<fastjson.version>1.2.60</fastjson.version>
5352
<swagger2.version>2.6.1</swagger2.version>
5453
<commons-lang3.version>3.9</commons-lang3.version>
5554
<commons-collections4.version>4.4</commons-collections4.version>
55+
<commons-io.version>2.6</commons-io.version>
56+
<commons-codec.version>1.13</commons-codec.version>
57+
<commons-net.version>3.6</commons-net.version>
58+
<commons-pool2.version>2.7.0</commons-pool2.version>
59+
<commons-text.version>1.8</commons-text.version>
60+
<fastjson.version>1.2.62</fastjson.version>
5661
<velocity.version>1.7</velocity.version>
5762
<mysql.version>5.1.47</mysql.version>
5863
<druid.version>1.1.20</druid.version>
59-
<commons-io.version>2.6</commons-io.version>
6064
<reflections.version>0.9.11</reflections.version>
61-
<commons-codec.version>1.13</commons-codec.version>
62-
<commons-net.version>3.6</commons-net.version>
6365
<jansi.version>1.18</jansi.version>
6466
<lombok.version>1.18.8</lombok.version>
65-
<commons-pool2.version>2.7.0</commons-pool2.version>
66-
<spring-boot-admin.version>2.1.6</spring-boot-admin.version>
67-
<hutool.version>4.6.4</hutool.version>
67+
<hutool.version>4.6.10</hutool.version>
6868
<junit.version>4.12</junit.version>
6969
<ini4j.version>0.5.4</ini4j.version>
7070
<mapstruct.version>1.3.0.Final</mapstruct.version>
@@ -301,6 +301,14 @@
301301
</dependency>
302302
<!-- Shiro+JWT end -->
303303

304+
<!-- XSS -->
305+
<dependency>
306+
<groupId>org.apache.commons</groupId>
307+
<artifactId>commons-text</artifactId>
308+
<version>${commons-text.version}</version>
309+
</dependency>
310+
311+
304312
</dependencies>
305313

306314

@@ -486,6 +494,7 @@
486494
<name>Spring Milestones</name>
487495
<url>https://maven.aliyun.com/repository/spring</url>
488496
</repository>
497+
<!-- 中央仓库 -->
489498
<repository>
490499
<id>central</id>
491500
<name>maven-central</name>

src/bin/startup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ STARTUP_LOG="${STARTUP_LOG}application background startup command: nohup java ${
122122
#======================================================================
123123
# 执行启动命令:后台启动项目,并将日志输出到项目根目录下的logs文件夹下
124124
#======================================================================
125-
nohup java ${JAVA_OPT} -jar ${BASE_PATH}/lib/${APPLICATION_JAR} --spring.config.location=${CONFIG_DIR} > ${LOG_PATH} 2>&1 &
125+
nohup java ${JAVA_OPT} -jar ${BASE_PATH}/lib/${APPLICATION_JAR} --spring.config.location=${CONFIG_DIR} --logging.config=${CONFIG_DIR}logback.xml > ${LOG_PATH} 2>&1 &
126126

127127

128128
# 进程ID

src/main/java/io/geekidea/springbootplus/SpringBootPlusApplication.java

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.springframework.boot.SpringApplication;
2323
import org.springframework.boot.autoconfigure.SpringBootApplication;
2424
import org.springframework.boot.context.properties.EnableConfigurationProperties;
25+
import org.springframework.boot.web.servlet.ServletComponentScan;
2526
import org.springframework.context.ConfigurableApplicationContext;
2627
import org.springframework.scheduling.annotation.EnableAsync;
2728
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -39,6 +40,7 @@
3940
@EnableConfigurationProperties
4041
@EnableAdminServer
4142
@MapperScan({"io.geekidea.springbootplus.**.mapper"})
43+
@ServletComponentScan
4244
@SpringBootApplication
4345
public class SpringBootPlusApplication {
4446

0 commit comments

Comments
 (0)