从文档:
Upon initialization of a DispatcherServlet, Spring MVC looks for a
file named [servlet-name]-servlet.xml in the WEB-INF directory of your
web application and creates the beans defined there, overriding the
definitions of any beans defined with the same name in the global
scope.
因此,将abc-servlet.xml放在WEB-INF中应该允许调度程序servlet接收您的配置.
如果您不希望调度程序servlet使用默认名称或希望它驻留在WEB-INF之外的另一个目录中,则可以在web.xml中指定此配置.可以通过在DispatcherServlet中设置contextConfigLocation init-param来更改调度程序servlet配置的位置和名称
dispatcher
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
WEB-INF/spring/servlet-context.xml
1
dispatcher
/