application-sharding.properties 7.05 KB
sharding.jdbc.datasource.names=muc_0,muc_1

sharding.jdbc.datasource.muc_0.type=org.apache.commons.dbcp.BasicDataSource
sharding.jdbc.datasource.muc_0.driver-class-name=com.mysql.jdbc.Driver
sharding.jdbc.datasource.muc_0.url=jdbc:mysql://10.136.55.211:3306/wbyb_muc_0
sharding.jdbc.datasource.muc_0.username=weixiao
sharding.jdbc.datasource.muc_0.password=Weixiao@123

sharding.jdbc.datasource.muc_1.type=org.apache.commons.dbcp.BasicDataSource
sharding.jdbc.datasource.muc_1.driver-class-name=com.mysql.jdbc.Driver
sharding.jdbc.datasource.muc_1.url=jdbc:mysql://10.136.55.211:3306/wbyb_muc_1
sharding.jdbc.datasource.muc_1.username=weixiao
sharding.jdbc.datasource.muc_1.password=Weixiao@123

sharding.jdbc.config.sharding.default-database-strategy.inline.sharding-column=union_id
sharding.jdbc.config.sharding.default-database-strategy.inline.algorithm-expression=muc_${union_id % 2}


sharding.jdbc.config.sharding.tables.muc_user.database-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_user.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user.actual-data-nodes=muc_${0..1}.muc_user_${0..1}
sharding.jdbc.config.sharding.tables.muc_user.table-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_user.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user.key-generator-column-name=id


sharding.jdbc.config.sharding.tables.muc_user_openId.database-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_user_openId.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_openId.actual-data-nodes=muc_${0..1}.muc_user_openId_${0..1}
sharding.jdbc.config.sharding.tables.muc_user_openId.table-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_user_openId.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_openId.key-generator-column-name=id

sharding.jdbc.config.sharding.tables.muc_stuent_rel.database-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_stuent_rel.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_stuent_rel.actual-data-nodes=muc_${0..1}.muc_stuent_rel_${0..1}
sharding.jdbc.config.sharding.tables.muc_stuent_rel.table-strategy.standard.sharding-column=union_id
sharding.jdbc.config.sharding.tables.muc_stuent_rel.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_stuent_rel.key-generator-column-name=id

##业务分库规则不一样###
sharding.jdbc.config.sharding.tables.muc_class.database-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_class.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_class.actual-data-nodes=muc_${0..1}.muc_class_${0..1}
sharding.jdbc.config.sharding.tables.muc_class.table-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_class.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_class.key-generator-column-name=id

sharding.jdbc.config.sharding.tables.muc_student.database-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_student.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_student.actual-data-nodes=muc_${0..1}.muc_student_${0..1}
sharding.jdbc.config.sharding.tables.muc_student.table-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_student.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_student.key-generator-column-name=id


sharding.jdbc.config.sharding.tables.muc_user_type.database-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_type.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_type.actual-data-nodes=muc_${0..1}.muc_user_type_${0..1}
sharding.jdbc.config.sharding.tables.muc_user_type.table-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_type.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_type.key-generator-column-name=id

sharding.jdbc.config.sharding.tables.muc_user_role.database-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_role.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_role.actual-data-nodes=muc_${0..1}.muc_user_role_${0..1}
sharding.jdbc.config.sharding.tables.muc_user_role.table-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_role.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_role.key-generator-column-name=id

sharding.jdbc.config.sharding.tables.muc_user_trace.database-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_trace.database-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.ds.PreciseModuloDatabaseShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_trace.actual-data-nodes=muc_${0..1}.muc_user_trace_${0..1}
sharding.jdbc.config.sharding.tables.muc_user_trace.table-strategy.standard.sharding-column=class_code
sharding.jdbc.config.sharding.tables.muc_user_trace.table-strategy.standard.preciseAlgorithmClassName=com.zhzf.fpj.xcx.sharding.strategy.table.PreciseModuloTableShardingAlgorithm
sharding.jdbc.config.sharding.tables.muc_user_trace.key-generator-column-name=id

sharding.jdbc.config.sharding.props.sql.show=false

sharding.jdbc.config.orchestration.name=muc_sharding
sharding.jdbc.config.orchestration.type=sharding
sharding.jdbc.config.orchestration.overwrite=false
sharding.jdbc.config.orchestration.zookeeper.namespace=orchestration-wbyb
sharding.jdbc.config.orchestration.zookeeper.server-lists=localhost:2181