How to configure log4j.properties for SpringJUnit4ClassRunner?

后端 未结 7 656
深忆病人
深忆病人 2021-01-30 04:06

Suddenly this keeps happening during a JUnit test. Everything was working, I wrote some new tests and this error occured. If I revert it, it won\'t go away. Why is that?

7条回答
  •  再見小時候
    2021-01-30 04:20

    I know this is old, but I was having trouble too. For Spring 3 using Maven and Eclipse, I needed to put the log4j.xml in src/test/resources for the Unit test to log properly. Placing in in the root of the test did not work for me. Hopefully this helps others.

提交回复
热议问题