In my web.xml
It seems loading multiple bean definition XML files does not work the way I expect. The last loaded XML file seems to overwrite all previous loaded XML files. In above example, the simple-utilities.xml would overwrite all other definitions defined in simple-dao.xml and simple-servlet.xml. Another word, anything defined in both simple-dao.xml and simple-servlet.xml disappear after simple-utilities.xml is loaded, or may be there is a bug in the XmlWebApplicationContext that prevent multiple bean definition files from loading properly.Code:<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/simple-servlet.xml, /WEB-INF/simple-dao.xml, /WEB-INF/simple-utilities.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener>
I am using the latest stable spring 3.0 release. (This is not an issue with Java base Config. @Configuration annotated class can successfully load multiple xml files)
Is this a correct behavior?


Reply With Quote