升级shardingsphere-jdbc版本到5.5.0,需要手工配置ShardingSphere数据源到spring.datasource.dynamic.datasource中,用法更明确

This commit is contained in:
JEECG
2025-10-14 16:02:15 +08:00
parent 03e6c97d80
commit 30ac3f7c72
15 changed files with 324 additions and 251 deletions

View File

@ -153,12 +153,10 @@ spring:
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:
#url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
#username: root
#password: root
#driver-class-name: com.mysql.cj.jdbc.Driver
# # shardingjdbc数据源
# sharding-db:
# driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
# url: jdbc:shardingsphere:classpath:sharding.yaml
#redis 配置
data:
redis: