wildFly部署时sl4J模块冲突

问题日志

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>

你可能感兴趣的:(wildFly部署时sl4J模块冲突)