ngshouyan.j-jdbc-test.1.1.13.source-code.application.yml Maven / Gradle / Ivy
j-jdbc:
tableInit: 2
db:
host: 127.0.0.1
port: 3306
schema: DB_TEST
username: root
password: abcd1234
spring:
application:
name: j-jdbc-test
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${db.host}:${db.port}/${db.schema}?useUnicode=true&characterEncoding=utf8&useSSL=false
username: ${db.username}
password: ${db.password}
# shardingsphere 4.0.0-RC1
# shardingsphere:
# datasource:
# names: ds0
# ds0:
# type: com.zaxxer.hikari.HikariDataSource
# jdbcUrl: jdbc:mysql://${db.host}:${db.port}/${db.schema}?useUnicode=true&characterEncoding=utf8&useSSL=false
# username: ${db.username}
# password: ${db.password}
# sharding:
# tables:
# DEMO_USER:
# actual-data-nodes: ds0.DEMO_USER$->{0..4}
# table-strategy:
# inline:
# sharding-column: age
# algorithm-expression: DEMO_USER$->{age % 5}
# props:
# sql:
# show: true
# shading-JDBC 3.1.0
#sharding:
# jdbc:
# datasource:
# names: ds0
# ds0:
# type: com.zaxxer.hikari.HikariDataSource
# jdbcUrl: jdbc:mysql://${db.host}:${db.port}/${db.schema}?useUnicode=true&characterEncoding=utf8&useSSL=false
# username: ${db.username}
# password: ${db.password}
# config:
# sharding:
# tables:
# DEMO_USER:
# actualDataNodes: ds0.DEMO_USER$->{0..4}
# tableStrategy:
# inline:
# shardingColumn: age
# algorithmExpression: DEMO_USER$->{age % 5}
# props:
# sql:
# show: true