阻止野蝇战争初始化 mojarra

Chr*_*ike 6 jsf mojarra wildfly wildfly-8 wildfly-10

每当我将战争部署到 wildfly 8 或 10(在这种情况下,它是一个 jax-rs 服务)时,我会看到以下行

[javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 151) Initializing Mojarra 2.2.11-jbossorg-1 20150505-1501 for context

由于应用程序中没有使用JSF,有没有办法阻止mojarra被初始化?

Chr*_*ike 6

将 jboss-deployment-structure.xml 文件添加到您的 WEB-INF 文件夹以停止部署单个战争

<jboss-deployment-structure>
  <deployment>
    <exclude-subsystems>
      <subsystem name="jsf" />
    </exclude-subsystems>
  </deployment>
</jboss-deployment-structure>
Run Code Online (Sandbox Code Playgroud)


小智 4

您可以删除

<subsystem xmlns="urn:jboss:domain:jsf:1.0"/>

从你的个人资料中。它应该停止 Mojarra 初始化。