From e003a8491b8e0faacb1b14f9a3b97a07b45792c0 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Wed, 22 Nov 2023 11:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- win-server/src/main/resources/application-prod.yaml | 11 +++++++++++ win-server/src/main/resources/application-test.yaml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/win-server/src/main/resources/application-prod.yaml b/win-server/src/main/resources/application-prod.yaml index 1eac7ae9..a9e8c390 100644 --- a/win-server/src/main/resources/application-prod.yaml +++ b/win-server/src/main/resources/application-prod.yaml @@ -66,6 +66,17 @@ spring: shardingColumn: create_time # 分片算法名称,不支持大写字母和下划线,否则启动就会报错 shardingAlgorithmName: time-sharding-altorithm + # 分片算法配置 + shardingAlgorithms: + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错 + time-sharding-altorithm: + # 类型:自定义策略 + type: CLASS_BASED + props: + # 分片策略 + strategy: standard + # 分片算法类 + algorithmClassName: com.win.framework.datasource.sharding.TimeShardingAlgorithm datasource: dynamic: strict: true diff --git a/win-server/src/main/resources/application-test.yaml b/win-server/src/main/resources/application-test.yaml index 485af7d2..b949e29d 100644 --- a/win-server/src/main/resources/application-test.yaml +++ b/win-server/src/main/resources/application-test.yaml @@ -66,6 +66,17 @@ spring: shardingColumn: create_time # 分片算法名称,不支持大写字母和下划线,否则启动就会报错 shardingAlgorithmName: time-sharding-altorithm + # 分片算法配置 + shardingAlgorithms: + # 分片算法名称,不支持大写字母和下划线,否则启动就会报错 + time-sharding-altorithm: + # 类型:自定义策略 + type: CLASS_BASED + props: + # 分片策略 + strategy: standard + # 分片算法类 + algorithmClassName: com.win.framework.datasource.sharding.TimeShardingAlgorithm datasource: dynamic: strict: true