Springboot在更換數據源的為druid的時候,報錯:
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]:22:14 Reason: org.apache.log4j.Logger Action: Update your application's configuration
原因是沒有引入log4j
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
ok ,再次啟動即可成功。
————————————————
版權聲明:本文為CSDN博主「new_buff_007」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/new_buff_007/article/details/90343935