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,


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM