public class SystemPropertiesFactoryBean
extends org.springframework.beans.factory.config.PropertiesFactoryBean
PropertiesFactoryBean
, but overrides or augments the resulting property set with values
from VM system properties. As with the Spring PropertyPlaceholderConfigurer
the following modes are
supported:
PropertiesLoaderSupport.setProperties(Properties)
or PropertiesLoaderSupport.setLocations(org.springframework.core.io.Resource[])
or
their names have been included explicitly in the set passed to setSystemProperties(Set)
.Constructor and Description |
---|
SystemPropertiesFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Properties |
mergeProperties() |
protected void |
resolveMergedProperty(String systemProperty,
Properties props)
Override hook.
|
void |
setSystemProperties(Set<String> systemProperties)
Set the names of the properties that can be considered for overriding.
|
void |
setSystemPropertiesMode(int systemPropertiesMode)
Set how to check system properties.
|
void |
setSystemPropertiesModeName(String constantName)
Set the system property mode by the name of the corresponding constant, e.g.
|
afterPropertiesSet, createInstance, createProperties, getObject, getObjectType, isSingleton, setSingleton
public void setSystemPropertiesModeName(String constantName) throws IllegalArgumentException
constantName
- name of the constantIllegalArgumentException
- if an invalid constant was specifiedsetSystemPropertiesMode(int)
public void setSystemPropertiesMode(int systemPropertiesMode)
PropertyPlaceholderConfigurer.setSystemPropertiesMode(int)
public void setSystemProperties(Set<String> systemProperties)
systemProperties
- a set of properties that can be fetched from the system propertiesprotected Properties mergeProperties() throws IOException
mergeProperties
in class org.springframework.core.io.support.PropertiesLoaderSupport
IOException
protected void resolveMergedProperty(String systemProperty, Properties props)
systemProperty
- Stringprops
- PropertiesCopyright © 2005–2018 Alfresco Software. All rights reserved.