springboot工程使用maven-assembly-plugin插件打包程序后,启动报jar包冲突,报错日志如下:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/api_streaming/streaming-api-1.0/lib/logback-classic-1.1.11.jar!/org/slf4j/impl/Static
LoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/api_streaming/streaming-api-1.0/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLo
ggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
显示是logback和slf4j-log4j12冲突,不能同时存在logback和slf4j-log4j12,此时程序是可以正常运行,但是日志却无法打印。