問題日志
java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
解決
建立一個
jboss-deployment-structure.xml
檔案,并将其放在項目的
META-INF
或
WEB-INF
目錄下,具體可參考如下連結:
http://s223.codeinspot.com/q/3310194
檔案中包含的内容如下所示:
<jboss-deployment-structure>
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->
<exclusions>
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
</jboss-deployment-structure>