I have the following in a TestCase's setUp() method. It works fine in 1.1.1:
However, in 1.1.2 it results in the following error:Code:// initialize Spring MockServletContext sc = new MockServletContext(""); sc.addInitParameter(ContextLoader.CONFIG_LOCATION_PARAM, "/WEB-INF/applicationContext*.xml"); ServletContextListener contextListener = new ContextLoaderListener(); ServletContextEvent event = new ServletContextEvent(sc); contextListener.contextInitialized(event);
Code:[junit] java.lang.UnsupportedOperationException: getResourcePaths [junit] at org.springframework.mock.web.MockServletContext.getResourcePaths(MockServletContext.java:128) [junit] at org.springframework.web.context.support.ServletContextResourcePatternResolver.doRetrieveMatchingServletContextResources(ServletContextResourcePatternResolver.java:100) [junit] at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:79) [junit] at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingFileResources(PathMatchingResourcePatternResolver.java:192) [junit] at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:145) [junit] at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:142)


Reply With Quote