Can I specify a log configuration file that will be used when starting JUnit with Spring?
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/my/app/springConfiguration.xml") public class MyTest { private static final Logger logger = LoggerFactory.getLogger(MyTest.class); @Autowired Something something; }
Now I have logback.xml and a few of them. There is one that should work in prod, and then there is one that I want this test to take. Is there an easy way to do this?
Edit: This question is specific to the case when I run JUnit from my Eclipse. I am working on Eclipse 4.3 on Windows 7.
java spring junit
partha
source share