Saturday, August 9, 2014

Initialize and access Spring in Web Application

---------------------------------------------------------- 
Initialize Spring  in web.xml
<listener>
    <listener-class>
        org.springframework.web.context.ContextLoaderListener
    </listener-class>
</listener>
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring/application-context.xml</param-value>
</context-param>
----------------------------------------------------------
Get Access to Spring Container
- getRequiredWebApplicationContext()
- getWebApplicationContext() of WebApplicationContextUtils:
----------------------------------------------------------

No comments:

Post a Comment