解决方案:
1、找到项目的pom.xml文件,添加依赖。如下图:
代码:
<dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
2、然后运行clean清除一下缓存,如下图:
3、最后运行项目,就成功啦!