SpringJUnit4ClassRunner 加载log4j配置文件

<bean id="log4jInitialization"
    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>src/test/resources/log4j.xml</value>
        </list>
    </property>
</bean>


你可能感兴趣的:(log4j)