Skip to content

Commit ed720d9

Browse files
committed
SpringBoot初始化模板v2.1.5 升级依赖,适配ShardingSphere 5.5.0版本,为分支迭代做铺垫。
1 parent 4a65a41 commit ed720d9

File tree

273 files changed

+217
-21109
lines changed

Some content is hidden

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

273 files changed

+217
-21109
lines changed

README.md

+56-28
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
> **作者:[AntonyCheng](https://github.com/AntonyCheng)**
88
>
9-
> **版本号:v2.1.4**
9+
> **版本号:v2.1.5**
1010
>
1111
> **开源协议:[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)**
1212
>
@@ -63,8 +63,8 @@
6363
* [搭建Deployer&Adapter系统](#搭建deployeradapter系统-)
6464
* [搭建Deployer&Client系统](#搭建deployerclient系统)
6565
* [兼容Java8](#兼容java8)
66+
* [前端预览](#前端预览)
6667
* [申明&联系我](#申明联系我)
67-
* [模板预览](#模板预览)
6868
* [下一步开发计划](#下一步开发计划)
6969

7070
## 模板特点
@@ -87,25 +87,25 @@
8787
- vue-admin-template 4.4.0 == 这是一个极简的 vue admin 管理后台,只包含了 Vue 2 & Element UI & axios & iconfont & permission control & lint
8888

8989
- **Netty**
90-
- netty-all 4.1.108.Final == Netty 框架
90+
- netty-all 4.1.109.Final == Netty 框架
9191
- **MySQL**
9292
- mysql-connector-j 8.0.33 == Java 连接 MySQL 依赖
9393
- druid-spring-boot-starter 1.2.22 == Druid 连接池
9494
- mybatis-plus-boot-starter 3.5.6 == MySQL 操作框架
95-
- shardingsphere-jdbc-core 5.3.2 == 分布式数据库解决方案
95+
- shardingsphere-jdbc-core 5.5.0 == 分布式数据库解决方案
9696
- **工具类**
9797
- lombok 1.18.32 == POJO 简化工具
9898
- hutool-all 5.8.27 == Hutool 工具类
9999
- commons-lang3 3.14.0 == Apache Commons Lang 工具类
100-
- commons-io 2.16.0 == Apache Commons IO 工具类
101-
- commons-codec 1.16.1 == Apache Commons Codec 工具类
100+
- commons-io 2.16.1 == Apache Commons IO 工具类
101+
- commons-codec 1.17.0 == Apache Commons Codec 工具类
102102
- commons-pool2 2.12.0 == Apache Commons Pool 工具类
103-
- commons-collections4 4.4 == Apache Commons Collections 工具类
103+
- commons-collections4 4.5.0-M1 == Apache Commons Collections 工具类
104104
- commons-math3 3.6.1 == Apache Commons Math 工具类
105105
- commons-compress 1.26.1 == Apache Commons Compress 工具类
106106
- okhttp 4.12.0 == OK Http 工具类
107107
- okio 3.9.0 == OK IO 工具类
108-
- fastjson2 2.0.48 == Fast JSON 工具类
108+
- fastjson2 2.0.49 == Fast JSON 工具类
109109
- ip2region 2.7.0 == 离线 IP 地址定位库
110110
- **权限校验**
111111
- sa-token-spring-boot-starter 1.37.0 == SaToken 认证鉴权框架
@@ -115,21 +115,21 @@
115115
- **缓存服务**
116116
- spring-boot-starter-data-redis == Spring Data Redis 依赖
117117
- spring-boot-starter-cache == Spring Cache 依赖
118-
- redisson 3.27.2 == Redis 的基础上实现的 Java 驻内存数据网格
118+
- redisson 3.29.0 == Redis 的基础上实现的 Java 驻内存数据网格
119119
- **本地缓存服务**
120120
- caffeine 3.1.8 == Caffeine 本地缓存依赖
121121
- **消息队列**
122122
- spring-boot-starter-amqp == 支持 AMQP (高级消息队列协议)消息代理
123123
- spring-rabbit-test == Spring 支持对 RabbitMQ 消息队列的单元测试
124124
- **搜索引擎**
125-
- easy-es-boot-starter 2.0.0-bata7 == 简化 Elasticsearch 搜索引擎,可以像 Mybatis-Plus 操作 MySQL 一样操作 Elasticsearch 的开源框架
125+
- easy-es-boot-starter 2.0.0-bata8 == 简化 Elasticsearch 搜索引擎,可以像 Mybatis-Plus 操作 MySQL 一样操作 Elasticsearch 的开源框架
126126
- elasticsearch 7.14.0 == Elasticsearch 依赖
127127
- elasticsearch-rest-high-level-client 7.14.0 == ES 高级别客户端依赖
128128
- logstash-logback-encoder 7.3 == Logstash 依赖
129129
- **对象存储(OSS)**
130-
- cos_api 5.6.210 == 腾讯云 COS
130+
- cos_api 5.6.211 == 腾讯云 COS
131131
- aliyun-sdk-oss 3.17.4 == 阿里云 OSS
132-
- minio 8.5.9 == Minio 对象存储
132+
- minio 8.5.10 == Minio 对象存储
133133
- **文件操作**
134134
- poi 5.2.5 == 操作 Word
135135
- poi-tl 1.12.2 == 操作 Word 模板
@@ -200,21 +200,16 @@
200200

201201
```yaml
202202
dataSources:
203-
master:
203+
ds_master:
204204
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
205205
driverClassName: com.mysql.cj.jdbc.Driver
206206
url: jdbc:mysql://127.0.0.1:3306/init_db?serverZoneId=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
207207
username: root
208208
password: 123456
209-
connectionTimeoutMilliseconds: 30000
210-
idleTimeoutMilliseconds: 600000
211-
maxLifetimeMilliseconds: 1800000
212-
maxPoolSize: 20
213-
minPoolSize: 10
214209
```
215-
216-
> 在这个文件中还能看到很多其他的配置,如有需要,请开发者自行学习 ShardingSphere 框架,理解相关配置;
217-
210+
211+
> 在这个文件中还能看到很多其他的配置,如有需要,请开发者自行学习 ShardingSphere 5.5.0 版本框架,理解相关配置;
212+
218213
3. 直到这一步之后,模板后端代码就已经可以直接启动了,访问 `http://localhost:38080/api/doc.html` 即可打开接口文档;
219214

220215
### 可选执行
@@ -392,6 +387,7 @@
392387
1. 修改消息队列相关配置,同时选择配置单机 RabbitMQ 或者集群 RabbitMQ ,切记这两者无法共存,使用其中一个配置的同时需要把另一个配置给注释或者删除掉(不建议删除,说不一定万一哪天有用呢),然后根据自己搭建的 RabbitMQ 进行相关配置:
393388

394389
```yaml
390+
spring:
395391
# RabbitMQ配置
396392
rabbitmq:
397393
# todo 是否开启RabbitMQ(预先关闭)
@@ -461,9 +457,21 @@
461457
#username:
462458
# 如果无账号密码则可不配置此行
463459
#password:
460+
# 多数据源
461+
#dynamic:
462+
#datasource:
463+
#ds1:
464+
#address: 127.0.0.1:9201
465+
# 如果无账号密码则可不配置此行
466+
#username:
467+
# 如果无账号密码则可不配置此行
468+
#password:
469+
#...(以下配置和单数据源类似)
470+
#ds2:
471+
#...(以下配置和ds1相似)
464472
# 默认为http 可缺省
465473
schema: http
466-
# 默认为true 打印banner 若您不期望打印banner,可配置为false
474+
# 打印banner 若您不期望打印banner,可配置为false(预先关闭)
467475
banner: false
468476
# 心跳策略时间 单位:ms
469477
keep-alive-millis: 30000
@@ -493,8 +501,11 @@
493501
map-underscore-to-camel-case: false
494502
# 索引前缀,可用于区分环境 默认为空 用法和MP的tablePrefix一样的作用和用法
495503
index-prefix: template_
496-
# id生成策略 customize为自定义,id值由用户生成,比如取MySQL中的数据id,如缺省此项配置,则id默认策略为es自动生成
497-
id-type: customize
504+
# id生成策略
505+
# 1、customize为自定义,_id值由用户生成,比如取MySQL中的数据id,如缺省此项配置,则_id默认策略为ES自动生成
506+
# 2、none为默认策略,由ES自动生成id
507+
# 3、uuid为全局唯一策略
508+
id-type: none
498509
# 数据刷新策略,默认为不刷新,若对数据时效性要求比较高,可以调整为immediate,但性能损耗高,也可以调整为折中的wait_until
499510
refresh-policy: immediate
500511
```
@@ -520,7 +531,7 @@
520531

521532
```java
522533
......
523-
@IndexName("t_user")
534+
@IndexName("i_user")
524535
......
525536
public class UserEs implements Serializable {
526537
......
@@ -662,9 +673,26 @@ oss:
662673
1. 修改验证码相关配置,开发者可以自行配置验证码的风格以及参数:
663674

664675
```yaml
676+
# Redisson配置(这里的Redisson配置主要用来系统业务逻辑的缓存服务)
677+
# 如果同时开启单机版本和集群版本,只有单机版本生效
678+
redisson:
679+
# Redis单机版本
680+
single-server-config:
681+
# todo 是否启动单机Redis(Redisson)缓存(预先关闭)
682+
enable-single: true
683+
# Redis集群版本
684+
cluster-servers-config:
685+
# todo 是否启动集群redisson(Redisson)缓存(预先关闭)
686+
enable-cluster: true
687+
# 离线IP库配置
688+
ip2region:
689+
# todo 是否启用离线IP
690+
enable: true
691+
# 数据加载方式
692+
load-type: memory
665693
# 验证码配置
666694
captcha:
667-
# todo 是否使用验证码(开启的前提是redisson配置完成,预先关闭)
695+
# todo 是否使用验证码(启用的前提是redisson配置完成和启用离线IP库ip2region,预先关闭)
668696
enable: true
669697
# 验证码类型:char 字符类型;math 数字类型。
670698
type: char
@@ -978,7 +1006,7 @@ spring:
9781006
exclude:
9791007
# todo 是否开启Redis依赖类(如果要启动Redis,就将RedisAutoConfiguration注释掉,该配置类一旦被注释,就需要设置Redis相关配置,预先关闭)
9801008
#- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
981-
# todo 是否使用Redis搭配SaToken鉴权认证(如果需要,就将RedisAutoConfiguration和SaTokenDaoRedisJackson注释掉,预先不使用)
1009+
# todo 是否使用Redis搭配SaToken鉴权认证(如果需要,就将RedisAutoConfiguration和SaTokenDaoRedisJackson同时注释掉,预先不使用)
9821010
#- cn.dev33.satoken.dao.SaTokenDaoRedisJackson
9831011
# 系统缓存Redis配置(这里的Redis配置主要用于鉴权认证等模板自带服务的系统缓存服务)
9841012
redis:
@@ -1295,7 +1323,7 @@ PowerJob是全新一代分布式任务调度与计算框架,其主要功能特
12951323
# 执行器AppName
12961324
app-name: power-job-executor
12971325
# PowerJob服务器地址
1298-
server-address: 127.0.0.1:38078
1326+
server-address: 127.0.0.1:38078/power-job-admin
12991327
# 网络传输协议
13001328
protocol: http
13011329
# 执行器信息存储介质

module/power-job-admin/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<description>power-job-admin</description>
1515
<properties>
1616
<java.version>11</java.version>
17-
<powerjob.server.version>4.3.8</powerjob.server.version>
17+
<powerjob.server.version>4.3.9</powerjob.server.version>
1818
<spring.boot.admin.client.version>2.7.9</spring.boot.admin.client.version>
1919
<lombok.version>1.18.30</lombok.version>
2020
</properties>

pom.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</parent>
1313
<groupId>top.sharehome</groupId>
1414
<artifactId>spring-boot-init-template</artifactId>
15-
<version>2.1.4</version>
15+
<version>2.1.5</version>
1616
<name>spring-boot-init-template</name>
1717
<description>spring-boot-init-template</description>
1818
<url>https://github.com/AntonyCheng/spring-boot-init-template</url>
@@ -55,7 +55,7 @@
5555
<!-- SpringBoot相关 -->
5656
<spring.boot.version>2.7.18</spring.boot.version>
5757
<!-- Netty相关 -->
58-
<netty.version>4.1.108.Final</netty.version>
58+
<netty.version>4.1.109.Final</netty.version>
5959
<!-- MySQL相关 -->
6060
<mysql.version>8.0.33</mysql.version>
6161
<druid.starter.version>1.2.22</druid.starter.version>
@@ -65,10 +65,10 @@
6565
<lombok.version>1.18.32</lombok.version>
6666
<hutool.version>5.8.27</hutool.version>
6767
<commons.lang3.version>3.14.0</commons.lang3.version>
68-
<commons.io.version>2.16.0</commons.io.version>
69-
<commons.codec.version>1.16.1</commons.codec.version>
68+
<commons.io.version>2.16.1</commons.io.version>
69+
<commons.codec.version>1.17.0</commons.codec.version>
7070
<commons.pool2.version>2.12.0</commons.pool2.version>
71-
<commons.collections4.version>4.4</commons.collections4.version>
71+
<commons.collections4.version>4.5.0-M1</commons.collections4.version>
7272
<commons.math3.version>3.6.1</commons.math3.version>
7373
<commons.compress.version>1.26.1</commons.compress.version>
7474
<ok.http3.version>4.12.0</ok.http3.version>
@@ -79,18 +79,18 @@
7979
<!-- 权限校验相关 -->
8080
<sa.token.version>1.37.0</sa.token.version>
8181
<!-- 缓存相关 -->
82-
<redisson.version>3.27.2</redisson.version>
82+
<redisson.version>3.29.0</redisson.version>
8383
<caffeine.version>3.1.8</caffeine.version>
8484
<!-- ElasticSearch相关 -->
8585
<elasticsearch.version>7.14.0</elasticsearch.version>
8686
<logstash.logback.version>7.3</logstash.logback.version>
87-
<easy.es.starter.version>2.0.0-beta7</easy.es.starter.version>
87+
<easy.es.starter.version>2.0.0-beta8</easy.es.starter.version>
8888
<!-- 对象存储相关 -->
89-
<tencent.cos.version>5.6.210</tencent.cos.version>
89+
<tencent.cos.version>5.6.211</tencent.cos.version>
9090
<ali.oss.version>3.17.4</ali.oss.version>
9191
<ali.jaxb.version>2.3.1</ali.jaxb.version>
9292
<ali.activation.version>1.1.1</ali.activation.version>
93-
<minio.version>8.5.9</minio.version>
93+
<minio.version>8.5.10</minio.version>
9494
<!-- 文件操作相关 -->
9595
<poi.version>5.2.5</poi.version>
9696
<poi.tl.version>1.12.2</poi.tl.version>

src/main/java/top/sharehome/springbootinittemplate/config/websocket/client_sample/index.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
</head>
77
<body>
88
<form onsubmit="return false">
9-
<textarea name="message" style="height: 300px;width: 300px"></textarea>
9+
<label>
10+
<textarea name="message" style="height: 300px;width: 300px"></textarea>
11+
</label>
1012
<input onclick="send(this.form.message.value)" type="button" value="发送消息">
11-
<textarea id="responseText" style="height: 300px;width: 300px"></textarea>
13+
<label>
14+
<textarea id="responseText" style="height: 300px;width: 300px"></textarea>
15+
</label>
1216
<input onclick="document.getElementById('responseText').value=''" type="button" value="清空内容">
1317
</form>
1418
</body>

src/main/resources/application.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ spring:
241241
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
242242
# todo 是否开启Redis依赖类(如果要启动Redis,就将RedisAutoConfiguration注释掉,该配置类一旦被注释,就需要设置Redis相关配置,预先关闭)
243243
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
244-
# todo 是否使用Redis搭配SaToken鉴权认证(如果需要,就将RedisAutoConfiguration和SaTokenDaoRedisJackson注释掉,预先不使用)
244+
# todo 是否使用Redis搭配SaToken鉴权认证(如果需要,就将RedisAutoConfiguration和SaTokenDaoRedisJackson同时注释掉,预先不使用)
245245
- cn.dev33.satoken.dao.SaTokenDaoRedisJackson
246246
data:
247247
# MongoDB配置
@@ -582,7 +582,7 @@ powerjob:
582582
# 执行器AppName
583583
app-name: power-job-executor
584584
# PowerJob服务器地址
585-
server-address: 127.0.0.1:38078
585+
server-address: 127.0.0.1:38078/power-job-admin
586586
# 网络传输协议
587587
protocol: http
588588
# 执行器信息存储介质

0 commit comments

Comments
 (0)