亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

down下配置后,啟動報錯:LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.

一啟動就報錯,對應的pom里也排除了logback,不知道怎么回事:

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/E:/local_repositorys/org/slf4j/slf4j-log4j12/1.7.13/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/E:/local_repositorys/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Log4jLoggerFactory loaded from file:/E:/local_repositorys/org/slf4j/slf4j-log4j12/1.7.13/slf4j-log4j12-1.7.13.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Log4jLoggerFactory

at org.springframework.util.Assert.instanceCheckFailed(Assert.java:655)

at org.springframework.util.Assert.isInstanceOf(Assert.java:555)

at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:286)

at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:102)

at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:220)

at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:199)

at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:119)

at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:69)

at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:302)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)

at com.facebook.sz.yjzj.server.Main.main(Main.java:24)


正在回答

1 回答

你這是用我提供的源碼跑起來的嗎??建議你還是照著視頻教程 一步一步搭建項目吧

看起來應該是你日志框架與配置文件的問題

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

down下配置后,啟動報錯:LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號