1. druid配置 SpringBoot启动报错
Description:
Failed to bind properties under 'spring.datasource.mysql.primary' to javax.sql.DataSource:
Property: spring.datasource.mysql.primary.filters
Value: stat,wall,log4j
Origin: class path resource [application.yml]:28:18
Reason: org.apache.log4j.Logger
在druid最新版本中,application.yml需要做如下替换
1.去除log4j
filters: stat,wall,log4j=》filters: stat,wall
2.添加一层配置
filters: stat,wall,log4j
=============》
filters:
commons-log.connection-logger-name: stat,wall,log4j