public class Settings4jContextLoaderListener
extends org.springframework.web.context.ContextLoaderListener
ServletContextListener
to initialize the Settings4jContextLoader
.
This Implementation replaces the ContextLoaderListener
web.xml -------------------------------------- <context-param> <param-name>settings4jContextConfigLocation</param-name> <param-value> ${com/myCompany/myApp/appContextSecurity}, /WEB-INF/applicationContext-otherBeans.xml </param-value> </context-param> <listener> <display-name></display-name> <listener-class>org.settings4j.helper.spring.Settings4jContextLoaderListener</listener-class> </listener> --------------------------------------With this configuration you define with tehKey teh path to your Security configuration.
-Dcom/myCompany/myApp/appContextSecurity=file:.../applicationContext-security-alwaysAdmin.xml
TOMCAT context.xml -------------------------------------- <Environment name ="com/myCompany/myApp/appContextSecurity" value="/WEB-INF/applicationContext-security.xml" type="java.lang.String" /> --------------------------------------
DefaultPropertiesLoader
:
web.xml -------------------------------------- <context-param> <param-name>settings4jDefaultProperties</param-name> <param-value> com/myCompany/myApp/appContextSecurity=/WEB-INF/applicationContext-security.xml </param-value> </context-param> <context-param> <param-name>settings4jContextConfigLocation</param-name> <param-value> ${com/myCompany/myApp/appContextSecurity}, /WEB-INF/applicationContext-otherBeans.xml </param-value> </context-param> <listener> <display-name></display-name> <listener-class>org.settings4j.helper.spring.Settings4jContextLoaderListener</listener-class> </listener> --------------------------------------
Constructor and Description |
---|
Settings4jContextLoaderListener() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.web.context.ContextLoader |
createContextLoader() |
contextDestroyed, contextInitialized, getContextLoader
closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext, initWebApplicationContext, loadParentContext
Copyright © 2008–2014. All rights reserved.