話不多說,報錯信息如下:
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.slf4j.impl.StaticLoggerBinder類無法加載到內存中。當在類路徑上找不到合適的SLF4J綁定時,就會發生這種情況。這裏引入相應的依賴即可。
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
詳細解答路徑:
http://www.slf4j.org/codes.html#StaticLoggerBinder
http://slf4j.org/manual.html#swapping