I have the following defined for my test:
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration("/App/webapp")
@ContextConfiguration({
"classpath:/config/AConfig.xml",
"classpath:/config/BConfig.xml",
"classpath:/config/CConfig.xml",
"classpath:/config/DConfig.xml"
})
public class MyTests{
...
}
In web.xml I use the same configuration plus additional configuration, for instance to configure filters and listeners. How can I enable these when doing tests?
It would be great if Spring just used the same web.xml but I guess that might not be an option.
I have this defined in web.xml:
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:/config/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
Is there a way to configure logging from a a contextConfig.xml ( bean definition ) instead?