去掉分表逻辑

This commit is contained in:
lu7213 committed 2025-12-03 11:31:14 +08:00
1 parent 2d0a09c734
commit 8d3cb18a46
4 files changed
+4 -139

No files matched your search

@@ -2,66 +2,8 @@
spring:
main:
allow-bean-definition-overriding: true
shardingsphere:
datasource:
names: ds0,ds1
ds0:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.0.4:3308/epusdt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Lgkj@123
type: com.alibaba.druid.pool.DruidDataSource
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
ds1:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.0.4:3308/epusdt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Lgkj@123
type: com.alibaba.druid.pool.DruidDataSource
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
props:
sql.show: true
sharding:
# 默认数据源
default-data-source-name: ds0
default-key-generator:
type: SNOWFLAKE
column: id
default-database-strategy:
inline:
sharding-column: id
algorithm-expression: ds$->{id % 2}
tables:
exam_student_paper_answer:
actual-data-nodes: ds$->{0..1}.exam_student_paper_answer_$->{0..1}
table-strategy:
inline:
sharding-column: id
algorithm-expression: exam_student_paper_answer_$->{id % 2}
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver