40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
spring:
|
|
main:
|
|
allow-bean-definition-overriding: true
|
|
shardingsphere:
|
|
datasource:
|
|
name: m1
|
|
m1:
|
|
type: com.alibaba.druid.pool.DruidDataSource
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
# url: jdbc:mysql://192.168.31.46:3377/gs_data_collection?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&allowMutiQueries=true
|
|
# username: root
|
|
# password: gs12345
|
|
url: jdbc:mysql://127.0.0.1:3306/gather_broker?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&allowMutiQueries=true
|
|
username: root
|
|
password: 123456
|
|
sharding:
|
|
tables:
|
|
item_record:
|
|
table-strategy:
|
|
inline:
|
|
sharding-column: id
|
|
algorithm-expression: item_record_$->{id%10+1}
|
|
actual-data-nodes: m1.item_record_$->{1..10}
|
|
key-generator:
|
|
column: id
|
|
type: SNOWFLAKE
|
|
props:
|
|
worker:
|
|
id: 1
|
|
server:
|
|
port: 8080
|
|
thymeleaf:
|
|
prefix: classpath:/templates/
|
|
mode: HTML
|
|
cache: false
|
|
encoding: UTF-8
|
|
servlet:
|
|
content-type: text/html
|
|
logging:
|
|
config: classpath:logback-spring.xml |