You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by gjc <zo...@niwodai.net> on 2019/02/22 09:08:05 UTC
orchestration.overwrite 配置不生效
sharding:
jdbc:
datasource:
names: ds_master,ds_slave_0
ds_master:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:33061/study?useUnicode=true&characterEncoding=utf-8&useSSL=false
username: root
password: pass
connection-timeout: 5000
idle-timeout: 12000
max-lifetime: 900000
connection-test-query: SELECT 1
min-idle: 10
maximum-pool-size: 20
ds_slave_0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:33062/study?useUnicode=true&characterEncoding=utf-8&useSSL=false
username: slave_user
password: slave_user@pass
connection-timeout: 5000
idle-timeout: 12000
max-lifetime: 900000
connection-test-query: SELECT 1
min-idle: 10
maximum-pool-size: 20
config:
props:
sql:
show: true
masterslave:
name: ds_ms
master-data-source-name: ds_master
slave-data-source-names: ds_slave_0
load-balance-algorithm-type: round_robin
orchestration:
name: apollo-ds
overwrite: false
registry:
server-lists: 127.0.0.1:2181
namespace: sharding-jdbc-orchestration
无论设置orchestration.overwrite=true | false 应用启动的时候都用默认的配置的数据源,而不从ZK配置中心中读取,只有动态修改znode的数据可以动态初始化数据源
我的问题:
按照文档说明 设置overwrite=false 会使用注册中心的配置来初始化数据源,而不用本地配置,现象是现在并没有这样。不知道是我配置问题?
恳请回复,谢谢!