Package org.openl.spring.env
Class PropertySourcesLoader
- java.lang.Object
-
- org.openl.spring.env.PropertySourcesLoader
-
- All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
public class PropertySourcesLoader extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
Allows to combine environment properties, default application properties and external application properties. This class can be used in the following ways:- In the web.xml, using "contextInitializerClasses" context parameter.
- In Spring java configuration like
new PropertySourcesLoader().initialize(applicationContext)
- OpenL default properties.
DefaultPropertySource- Java preferences.
PreferencePropertySource- Application externalized configuration.
ApplicationPropertySource
- Application modifiable configuration.
DynamicPropertySource
- OS environment variables.
System.getenv()- Java System properties.
System.getProperties()- JNDI attributes from
java:comp/env- Servlet context loadProperties parameters from
ServletContext.getInitParameter(java.lang.String)- Author:
- Yury Molchan
- See Also:
PropertySourcesPlaceholderConfigurer,PlaceholderConfigurerSupport,ApplicationContextInitializer,ApplicationPropertySource
-
-
Constructor Summary
Constructors Constructor Description PropertySourcesLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(org.springframework.context.ConfigurableApplicationContext appContext)voidinitialize(org.springframework.context.ConfigurableApplicationContext appContext, javax.servlet.ServletContext servletContext)
-
-
-
Method Detail
-
initialize
public void initialize(org.springframework.context.ConfigurableApplicationContext appContext)
- Specified by:
initializein interfaceorg.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
-
initialize
public void initialize(org.springframework.context.ConfigurableApplicationContext appContext, javax.servlet.ServletContext servletContext)
-
-