third party libraries
有时您的项目中可能有一个可能与您发生冲突server-embedded jars
的问题。从应用程序服务器中删除嵌入式 jarlib folder
可能会破坏其他已部署的应用程序。
有没有办法为TomEE、JBoss、GlassFish 中的一个项目禁用服务器嵌入式 jar?
third party libraries
有时您的项目中可能有一个可能与您发生冲突server-embedded jars
的问题。从应用程序服务器中删除嵌入式 jarlib folder
可能会破坏其他已部署的应用程序。
有没有办法为TomEE、JBoss、GlassFish 中的一个项目禁用服务器嵌入式 jar?
在 JBoss 中,您可以使用 WEB-INF 目录中的 jboss-deployment-structure.xml 描述符禁用容器管理的库。
<jboss-deployment-structure>
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding
some dependencies -->
<exclusions>
<!-- This will cause the JBoss container to not provide your deployed
application's log4j dependencies. This way you can use an implementation
deployed with your artifact. -->
<module name="org.apache.log4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>
JBoss AS 7 中的类加载文档可以在这里找到。