过去,我习惯于 spring 4.3.8 版本,我习惯于在 web.xml 中配置 Log4j,如下面的代码,
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:/log4j-${spring.profiles.active}.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
Run Code Online (Sandbox Code Playgroud)
目前,我尝试使用 spring 5.0.7 版本,但是,我不能使用 Log4jConfigListener
我意识到 Spring 5.x 版本中不存在 Log4jConfigListener
我可以使用“log4j.xml”(默认名称)但我想使用自定义名称作为服务器,本地环境
我能怎么做?