开发者

Spring config file naming convention

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜