Spring boot yml還敢不敢再坑一點? 配置多資料來源的問題!
阿新 • • 發佈:2019-01-10
yml在配置多資料來源時 出現 只有最後一個數據源可以掃描到
改成properties立馬好了
可能誰都不會注意會有這個坑吧
#設定伺服器配置
server:
port: 8090
spring:
thymeleaf:
cache: false
devtools:
restart:
enabled: true
redis:
host: 127.0.0.1
port: 8082
password: root
autoconfigure:
exclude:
logging:
config: classpath:config/log4j2.xml
db:
basic:
url: jdbc:mysql://www.xxxxx.cn:3306/test1?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
db:
school:
core:
url: jdbc:mysql://www.xxxxx.cn:3306/test2?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=GMT%2 B8
username: root
password: root