Reputation: 7357
I've read Spring docs, and what thery says is
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.
The thing is I used spring myappContext.xml
which was loaded by org.springframework.web.context.ContextLoaderListener
. Is it possible to use both dispatcher
's and my old configuration files in the application? I just wouldn't move all definition from the myappContext.xml
config to dispacther
's config. Is it possible?
Upvotes: 1
Views: 110
Reputation: 240900
you could import xml file into your dispatcher's bean xml file that way you won't have to copy all beans into single file
<import resource="classpath:/path/to/bean-defination.xml"/>
Upvotes: 1