Java 如何使用CDI根据jboss系统属性根据环境(开发、测试、生产)加载不同的log4j2配置文件
我需要使用CDI加载不同的log4j2配置文件(log4j2-dev.xml、log4j test.xml) 我认为这可以通过使用Java 如何使用CDI根据jboss系统属性根据环境(开发、测试、生产)加载不同的log4j2配置文件,java,cdi,Java,Cdi,我需要使用CDI加载不同的log4j2配置文件(log4j2-dev.xml、log4j test.xml) 我认为这可以通过使用 <context-param> <param-name>log4jConfigLocation</param-name> <param-value>classpath:conf/log4j-${ENV-NAME}.xml</param-value> </context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:conf/log4j-${ENV-NAME}.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
log4jConfigLocation
类路径:conf/log4j-${ENV-NAME}.xml
org.springframework.web.util.Log4jConfigListener
有没有一种方法可以使用cdi焊接实现同样的效果?看看deltaspike