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

 

posted @ 2020-06-22 19:40  feibazhf  阅读(1008)  评论(0编辑  收藏  举报