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

springboot集成druid启动时报错,日志框架用的是log4j2,配置文件就是官网的配置没有改动,启动时报如下错误
 
Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource:
 
    Property: spring.datasource.druid.filters
    Value: stat,wall,log4j
    Origin: class path resource [application.yml]:43:16
    Reason: org.apache.log4j.Logger
 
Action:
 
Update your application's configuration
 
 
解决方式:
1.引入log4j依赖
2.修改配置文件 spring.datasource.druid.filter=log4j2,
posted @ 2020-10-20 11:31  沟渠映明月  阅读(2811)  评论(0编辑  收藏  举报