springboot默認數據源hikari替換成druid,啟動提示Failed to configure a DataSource: 'url' attribute is not specified and no embedded


原因是

hikira:

spring.datasource.bi.jdbc-url=jdbc:mysql://ip:3306/base?allowMultiQueries=true&useUnicode=true&autoReconnect=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull

 

druid:

spring.datasource.bi.url=jdbc:mysql://ip:3306/base?allowMultiQueries=true&useUnicode=true&autoReconnect=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull

更改數據源配置的同事,對應的url一個是jdbc-url要改成url

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM