How to configure log4j.properties for SpringJUnit4ClassRunner?

后端 未结 7 720
深忆病人
深忆病人 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:39

    I was using Maven in eclipse and I did not want to have an additional copy of the properties file in the root folder. You can do the following in eclipse:

    1. Open run dialog (click the little arrow next to the play button and go to run configurations)
    2. Go to the "classpath" tab
    3. Select the "User Entries" and click the "Advanced" button on the right side.
    4. Now select the "Add External folder" radio button.
    5. Select the resources folder

提交回复
热议问题