[TOSLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
执行MyBatis的时候,爆这个异常,具体图片如下:
点击链接,前往这个页面,查看
具体内容如下,就是要有如下的一个jar包,并且不能重复
Placing one (and only one) of slf4j-nop.jar slf4j-simple.jar,
slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class
path should solve the problem.
找了这么一个依赖,运行后还是报错
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>test</scope>
</dependency>
到网上找了一下,有位大佬说,将这里的scope改成complie,改成编译时,因为不仅仅是测试的时候,需要,打包后任然需要这个依赖.
改成complie,执行成功.
小白学习中,有错误请指正.