Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:

Springboot在更换数据源的为druid的时候,报错:

Description:

Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:

Property: spring.datasource.filters
Value: stat,wall,log4j
Origin: class path resource [application.yml]:22:14
Reason: org.apache.log4j.Logger

Action:

Update your application's configuration

 


原因是没有引入log4j

<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

 


ok ,再次启动即可成功。
————————————————
版权声明:本文为CSDN博主「new_buff_007」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/new_buff_007/article/details/90343935

posted @ 2020-02-20 15:42  厸清扬  阅读(1297)  评论(0编辑  收藏  举报