开发者

Spring config file naming convention

开发者 https://www.devze.com 2023-01-29 03:47 出处:网络
What actually is the naming convention in Spring that the config file has to have a name \"servletname-.xml\".

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

精彩评论

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