【发布时间】:2018-06-14 21:47:27
【问题描述】:
我使用的是 Spring 4.X.X 并使用以下设置来配置 Log4j。现在正在将其升级到 Spring 5.0.2,其中 Log4jConfigurer 类已被删除。我如何在 Spring 5.0.2 中做到这一点?
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="org.springframework.util.Log4jConfigurer"/>
<property name="targetMethod" value="initLogging"/>
<property name="arguments">
<list>
<value>classpath:log4j.properties</value>
</list>
</property>
</bean>
【问题讨论】: