问题:使用idea创建Maven工程,进行单元测试时,出现SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.错误。
解决:在pom.xml中添加依赖,因为在测试环境下所以scope标签中为test,运行在main下的可以将test改一下。
org.slf4j slf4j-simple 1.7.25 test

问题:使用idea创建Maven工程,进行单元测试时,出现SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.错误。
解决:在pom.xml中添加依赖,因为在测试环境下所以scope标签中为test,运行在main下的可以将test改一下。
org.slf4j slf4j-simple 1.7.25 test