小编Gar*_*eth的帖子

Spring 5.0.2 中的 Log4jConfigurer

我使用的是 Spring 4.XX 并使用以下设置来配置 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>
Run Code Online (Sandbox Code Playgroud)

java spring log4j slf4j

7
推荐指数
1
解决办法
7293
查看次数

标签 统计

java ×1

log4j ×1

slf4j ×1

spring ×1