blob: 0270cd2e601787dfd1752b32e4f90bbff525af8e [file] [log] [blame]
spring.shardingsphere.datasource.names=ds_0,ds_1
spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds_0.driver-class-name=org.postgresql.Driver
spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_0
spring.shardingsphere.datasource.ds_0.username=postgres
spring.shardingsphere.datasource.ds_0.password=
spring.shardingsphere.datasource.ds_1.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds_1.driver-class-name=org.postgresql.Driver
spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:postgresql://localhost:5432/shardingsphere?currentSchema=demo_ds_1
spring.shardingsphere.datasource.ds_1.username=postgres
spring.shardingsphere.datasource.ds_1.password=
spring.shardingsphere.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.tables.t_user.table-strategy.inline.algorithm-expression=t_user_$->{user_id % 2}
spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.tables.t_user.database-strategy.inline.algorithm-expression=ds_$->{user_id % 2}
spring.shardingsphere.sharding.tables.t_user.key-generator.column=user_id
spring.shardingsphere.sharding.tables.t_user.key-generator.type=SNOWFLAKE
spring.shardingsphere.sharding.tables.t_user.key-generator.props.worker.id=123
spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_md5.type=md5
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.plainColumn=user_name
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.cipherColumn=user_name_cipher
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.user_name.encryptor=encryptor_aes
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.plainColumn=pwd_plain
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.cipherColumn=pwd_cipher
spring.shardingsphere.sharding.encrypt-rule.tables.t_user.columns.pwd.encryptor=encryptor_md5