springBoot配置druid监控报错Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource

报错信息:   

Description:

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

Property: spring.datasource.druid.filters
Value: stat,log4j
Origin: class path resource [application.yml]:47:16
Reason: org.apache.log4j.Logger

Action:

Update your application's configuration

 

 

 

 

解决办法

第一种:

在pom文件中添加log4j依赖

<dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
</dependency>

 

第二种:

删除配置中的log4j即可

 

 

具体采取哪种办法根据实际情况而定。。。

 

posted @ 2019-11-03 21:31  Jony.K.Chen  阅读(3935)  评论(0编辑  收藏  举报