Skip to content

Commit d8e8842

Browse files
Merge pull request #47 from geekidea/dev
spring-boot-plusV1.2.3发布,CentOS快速安装环境/构建/部署/启动项目
2 parents 699c6c5 + 8c9bf24 commit d8e8842

File tree

7 files changed

+99
-86
lines changed

7 files changed

+99
-86
lines changed

CHANGELOG.md

Lines changed: 30 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,37 @@
11
# 更新日志 CHANGELOG
22

3-
##
43
## [V1.2.3-RELEASE] 2019.09.09 :computer:
4+
> spring-boot-plusV1.2.3发布,CentOS快速安装环境/构建/部署/启动项目
5+
56
### ⭐️ New Features
6-
# spring-boot-plusV1.2.3发布,CentOS快速安装环境/构建/部署/启动项目
7-
## 1. 下载安装脚本
8-
> 安装 `jdk`, `git`, `maven`, `redis`, `mysql`
9-
10-
```bash
11-
wget -O download-install-all.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/dev/docs/bin/install/download-install-all.sh
12-
```
13-
14-
## 2. 运行安装脚本
15-
```bash
16-
sh download-install-all.sh
17-
```
18-
19-
## 3. 修改MySQL密码
20-
```bash
21-
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Springbootplus666!';
22-
exit
23-
mysql -uroot -pSpringbootplus666!
24-
```
25-
26-
## 4. 导入MySQL脚本
27-
```bash
28-
create database if not exists spring_boot_plus character set utf8mb4;
29-
use spring_boot_plus;
30-
source /root/mysql_spring_boot_plus.sql;
31-
show tables;
32-
exit
33-
```
34-
35-
## 5. 下载部署脚本 `deploy.sh`
36-
```bash
37-
wget -O deploy.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/dev/deploy/deploy.sh
38-
```
39-
40-
## 6. 执行脚本
41-
```bash
42-
sh deploy.sh
43-
```
44-
45-
## 7.访问项目
46-
> SpringBootAdmin管理页面
47-
48-
[http://localhost:8888](http://localhost:8888)
49-
50-
> spring-boot-plus Swagger文档页面
51-
52-
[http://localhost:8888/docs](http://localhost:8888/docs)
53-
54-
## 8. 查看项目运行日志
55-
```bash
56-
tail -f -n 1000 /root/spring-boot-plus-server/logs/spring-boot-plus.log
57-
```
7+
- 项目运行环境安装脚本
8+
- CentOS快速构建/部署/启动项目脚本
9+
10+
### ⚡️ Optimization
11+
- 优化 `maven-assembly-plugin` 项目打包插件
12+
13+
### 📝 Added/Modified
14+
Add [install-jdk.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-jdk.sh) yum安装`jdk8`脚本
15+
Add [install-git.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-git.sh) yum安装`git`脚本
16+
Add [install-maven.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-maven.sh) yum安装`maven`脚本
17+
Add [install-redis.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-redis.sh) yum安装`redis`脚本
18+
Add [install-mysql.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-mysql.sh) yum安装`mysql`脚本
19+
Add [install-all.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-all.sh) 安装所有环境脚本
20+
Add [download-install-all.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/download-install-all.sh) 下载并安装所有环境脚本
21+
Add [deploy.sh](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/deploy/deploy.sh) 下载项目/构建/部署/启动项目脚本
22+
23+
### 📔 Documentation
24+
[CentOS Quick Installation Environment / Build / Deploy / Launch Spring-boot-plus Project](https://github.com/geekidea/spring-boot-plus#centos-quick-installation-environment--build--deploy--launch-spring-boot-plus-project)
25+
26+
### 🔨 Dependency Upgrades
27+
- Upgrade to `springboot` 2.1.8.RELEASE
28+
- Upgrade to `Mybatis` 3.5.2
29+
- Upgrade to `Mybatis Plus` 3.2.0
30+
- Upgrade to `Alibaba Druid` 1.1.20
31+
- Upgrade to `Fastjson` 1.2.60
32+
- Upgrade to `commons-codec` 1.13
33+
- Upgrade to `commons-collections` 4.4
34+
- Upgrade to `hutool-all` 4.6.4
5835

5936

6037
## [V1.2.2-RELEASE] 2019.08.26 🏇

README-zh.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ Redis | 3.2+ | |
5858
### 技术选型
5959
技术 | 版本 | 备注
6060
-|-|-
61-
Spring Boot | 2.1.7.RELEASE | 最新发布稳定版 |
61+
Spring Boot | 2.1.8.RELEASE | 最新发布稳定版 |
6262
Spring Framework | 5.1.9.RELEASE | 最新发布稳定版 |
63-
Mybatis | 3.5.1 | 持久层框架 |
64-
Mybatis Plus | 3.1.2 | mybatis增强框架 |
65-
Alibaba Druid | 1.1.18 | 数据源 |
66-
Fastjson | 1.2.59 | JSON处理工具集 |
63+
Mybatis | 3.5.2 | 持久层框架 |
64+
Mybatis Plus | 3.2.0 | mybatis增强框架 |
65+
Alibaba Druid | 1.1.20 | 数据源 |
66+
Fastjson | 1.2.60 | JSON处理工具集 |
6767
swagger2 | 2.6.1 | api文档生成工具 |
6868
commons-lang3 | 3.9 | 常用工具包 |
6969
commons-io | 2.6 | IO工具包 |
70-
commons-codec | 1.12 | 加密解密等工具包 |
71-
commons-collections | 3.2.1 | 集合工具包 |
70+
commons-codec | 1.13 | 加密解密等工具包 |
71+
commons-collections4 | 4.4 | 集合工具包 |
7272
reflections | 0.9.11 | 反射工具包 |
7373
hibernate-validator | 6.0.17.Final | 后台参数校验注解 |
7474
jwt | 0.9.1 | json web token |
75-
hutool-all | 4.5.10 | 常用工具集 |
75+
hutool-all | 4.6.4 | 常用工具集 |
7676
lombok | 1.18.8 | 注解生成Java Bean等工具 |
7777

7878

README.md

Lines changed: 10 additions & 10 deletions
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.2.2--RELEASE-blue">
12+
<img alt="spring-boot-plus version" src="https://img.shields.io/badge/spring--boot--plus-1.2.3--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.7.RELEASE-brightgreen">
15+
<img alt="spring boot version" src="https://img.shields.io/badge/spring%20boot-2.1.8.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,21 +58,21 @@ Redis | 3.2+ | |
5858
### Technology stack
5959
Component| Version | Remark
6060
-|-|-
61-
Spring Boot | 2.1.7.RELEASE | Latest release stable version |
61+
Spring Boot | 2.1.8.RELEASE | Latest release stable version |
6262
Spring Framework | 5.1.9.RELEASE | Latest release stable version |
63-
Mybatis | 3.5.1 | DAO Framework |
64-
Mybatis Plus | 3.1.2 | mybatis Enhanced framework |
65-
Alibaba Druid | 1.1.18 | Data source |
66-
Fastjson | 1.2.59 | JSON processing toolset |
63+
Mybatis | 3.5.2 | DAO Framework |
64+
Mybatis Plus | 3.2.0 | mybatis Enhanced framework |
65+
Alibaba Druid | 1.1.20 | Data source |
66+
Fastjson | 1.2.60 | JSON processing toolset |
6767
swagger2 | 2.6.1 | Api document generation tool |
6868
commons-lang3 | 3.9 | Apache language toolkit |
6969
commons-io | 2.6 | Apache IO Toolkit |
70-
commons-codec | 1.12 | Apache Toolkit such as encryption and decryption |
71-
commons-collections | 3.2.1 | Apache collections toolkit |
70+
commons-codec | 1.13 | Apache Toolkit such as encryption and decryption |
71+
commons-collections4 | 4.4 | Apache collections toolkit |
7272
reflections | 0.9.11 | Reflection Toolkit |
7373
hibernate-validator | 6.0.17.Final | Validator toolkit |
7474
jwt | 0.9.1 | JSON WEB TOKEN |
75-
hutool-all | 4.5.10 | Common toolset |
75+
hutool-all | 4.6.4 | Common toolset |
7676
lombok | 1.18.8 | Automatically plugs |
7777

7878
## Getting started

deploy/deploy.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
NOW=$(date --date='0 days ago' "+%Y-%m-%d-%H-%M-%S")
2727
echo "${NOW}"
28+
PULL_RESULT=""
29+
IS_UPDATE=0
2830

2931
# 1. 下载或更新spring-boot-plus版本库
3032
# 先判断当前目录下是否有spring-boot-plus目录
@@ -34,7 +36,17 @@ if [ ! -d "spring-boot-plus" ]; then
3436
git clone https://github.com/geekidea/spring-boot-plus.git
3537
else
3638
cd spring-boot-plus
37-
git pull
39+
40+
# 拉取代码,并获取结果判断,是否有新的代码更新,如果有,则备份之前的server,否则替换
41+
PULL_RESULT=$(git pull)
42+
echo "${PULL_RESULT}"
43+
44+
if [[ ! $PULL_RESULT == *up-to-date* ]]
45+
then
46+
echo "Update code..."
47+
IS_UPDATE=1
48+
fi
49+
3850
fi
3951

4052
# 2. maven打包
@@ -53,9 +65,16 @@ fi
5365
if [ ! -d "spring-boot-plus-server-back" ]; then
5466
mkdir spring-boot-plus-server-back
5567
fi
56-
mv spring-boot-plus-server spring-boot-plus-server-back/spring-boot-plus-server-back-"${NOW}"
5768

58-
cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
69+
if [[ $IS_UPDATE == 1 ]]
70+
then
71+
echo "Back spring-boot-plus-server..."
72+
mv spring-boot-plus-server spring-boot-plus-server-back/spring-boot-plus-server-back-"${NOW}"
73+
fi
74+
75+
echo "Copy spring-boot-plus-server-assembly.tar.gz..."
76+
# 复制到项目同级目录,如果有,则覆盖
77+
cp -r -f spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
5978

6079
# 5. 运行spring-boot-plus
6180
tar -zxvf spring-boot-plus-server-assembly.tar.gz

docs/CHANGELOG_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [Vx.x.x-RELEASE] xxxx.xx.xx 💻
2+
>
3+
4+
### ⭐️ New Features
5+
6+
### ⚡️ Optimization
7+
8+
### 📝 Added/Modified
9+
10+
### 🐞 Bug Fixes
11+
12+
### 📔 Documentation
13+
14+
### 🔨 Dependency Upgrades
15+

docs/bin/install/install-jdk.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#======================================================================
1818
# 快速安装JDK
1919
# CentOS7 中已成功验证
20-
# 使用yum+rpm方式安装
20+
# 使用yum方式安装
2121
#
2222
# author: sy
2323
# date: 2019-8-29
@@ -38,7 +38,7 @@ if [ $? != 1 ]
3838
then
3939
echo "Not Found jdk"
4040
echo "Installing jdk..."
41-
yum install -y maven
41+
yum install -y java-1.8.0-openjdk
4242
hasJdk
4343
if [ $? != 1 ]
4444
then

pom.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,25 @@
4646
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4747
<project-parent.version>${parent.version}</project-parent.version>
4848
<java.version>1.8</java.version>
49-
<spring-boot.version>2.1.7.RELEASE</spring-boot.version>
50-
<mybatis-plus-boot-starter.version>3.1.2</mybatis-plus-boot-starter.version>
51-
<fastjson.version>1.2.59</fastjson.version>
49+
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
50+
<mybatis-plus-boot-starter.version>3.2.0</mybatis-plus-boot-starter.version>
51+
<fastjson.version>1.2.60</fastjson.version>
5252
<swagger2.version>2.6.1</swagger2.version>
5353
<commons-lang3.version>3.9</commons-lang3.version>
54+
<commons-collections4.version>4.4</commons-collections4.version>
5455
<velocity.version>1.7</velocity.version>
5556
<mysql.version>5.1.47</mysql.version>
56-
<druid.version>1.1.18</druid.version>
57+
<druid.version>1.1.20</druid.version>
5758
<commons-io.version>2.6</commons-io.version>
5859
<reflections.version>0.9.11</reflections.version>
59-
<commons-codec.version>1.12</commons-codec.version>
60+
<commons-codec.version>1.13</commons-codec.version>
6061
<commons-net.version>3.6</commons-net.version>
6162
<jansi.version>1.18</jansi.version>
6263
<lombok.version>1.18.8</lombok.version>
63-
<commons-pool2.version>2.6.2</commons-pool2.version>
64+
<commons-pool2.version>2.7.0</commons-pool2.version>
6465
<jwt.version>0.9.1</jwt.version>
6566
<spring-boot-admin.version>2.1.6</spring-boot-admin.version>
67+
<hutool.version>4.6.4</hutool.version>
6668

6769
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
6870
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
@@ -183,9 +185,9 @@
183185
</dependency>
184186

185187
<dependency>
186-
<groupId>commons-collections</groupId>
187-
<artifactId>commons-collections</artifactId>
188-
<version>3.2.1</version>
188+
<groupId>org.apache.commons</groupId>
189+
<artifactId>commons-collections4</artifactId>
190+
<version>${commons-collections4.version}</version>
189191
</dependency>
190192

191193
<dependency>
@@ -243,7 +245,7 @@
243245
<dependency>
244246
<groupId>cn.hutool</groupId>
245247
<artifactId>hutool-all</artifactId>
246-
<version>4.5.10</version>
248+
<version>${hutool.version}</version>
247249
</dependency>
248250

249251
<!-- spring boot admin start -->

0 commit comments

Comments
 (0)