Reputation: 35
I want to know how actually the spring container gets loaded on server.. and in how many ways can that be done and exactly how the server comes to know that it has to start the spring container. I tried to google it but no luck.
Upvotes: 1
Views: 846
Reputation: 291
The simplest solutions is to use a ContextLoaderListener
:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
See http://static.springsource.org/spring/docs/4.0.x/spring-framework-reference/html/web-integration.html for details.
Upvotes: 1