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即可

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

猜你喜欢

转载自www.cnblogs.com/lxcy/p/11789272.html