When an error Reason spring boot configuration druid of filters: org.apache.log4j.Priority

Error message:

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]:21:16
Reason: org.apache.log4j.Priority
解决方案:
缺少log4j的包,依赖如下:
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
    </dependency>

Using the above log adapter package provided by spring boot, in fact logging function in the jar final call or LogBack framework, so our system would not have to use multiple log frame!

Guess you like

Origin www.cnblogs.com/guoyinghome/p/11220137.html