***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'spring.datasource' to javax.sql.DataSource:
Property: spring.datasource.filters
Value: stat,wall,log4j
Origin: class path resource [application.yml]:21:14
Reason: org.apache.log4j.Logger
Action:
Update your application's configuration
場景:
使用druid數據源時,配置driub監控對象出錯:
解決:
- 可能是springboot版本問題導致;
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
2.可能是由於沒有導入stat ,wall,log4j,需導入log4j
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
細心的觀察控制檯錯誤信息
參考:
https://blog.csdn.net/clmmei_123/article/details/82083279
https://blog.csdn.net/qq_37495786/article/details/82781700
https://blog.csdn.net/x_san3/article/details/83384148