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,