What actually is the naming convention in Spring that the config file has to have a name "servletname-.xml".
If the name is different, will it not work?How does this reconcile with the fact that we can have a name : spring-config.xml and load it with new ClassPathXmlApplicationCont开发者_运维百科ext("spring-config.xml"). There seems to be no need to follow a naming convention here
The convention is just that: a convention. It is defined in the FrameworkServlet on which the (popular) DispatcherServlet is built. You can change the location by setting the contextConfigLocation param.
精彩评论