public class BeanLevelPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer implements BeanNameAware, BeanFactoryAware, BeanLevelPropertiesAware, ClusterInfoAware
PropertyPlaceholderConfigurer
that works with
BeanLevelProperties
in order to inject bean level properties.
${..} notations are used to lookup bean level properties with the properties obtained based on
the bean name using BeanLevelProperties.getMergedBeanProperties(String)
.
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator
localOverride, localProperties, logger, XML_FILE_EXTENSION
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties) |
BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties,
ClusterInfo clusterInfo) |
Modifier and Type | Method and Description |
---|---|
protected void |
processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props) |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
Sets the
BeanLevelProperties . |
void |
setBeanName(String beanName) |
void |
setClusterInfo(ClusterInfo clusterInfo)
Sets the cluster information.
|
parseStringValue, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
doProcessProperties, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator
convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
public BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties)
public BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties, ClusterInfo clusterInfo)
public void setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
BeanLevelPropertiesAware
BeanLevelProperties
.setBeanLevelProperties
in interface BeanLevelPropertiesAware
public void setClusterInfo(ClusterInfo clusterInfo)
ClusterInfoAware
Note, the cluster information is obtained externally from the application context which means
that this feature need to be supported by specific containers (and is not supported by plain
Spring application context). This means that beans that implement ClusterInfoAware
should take into account the fact that the cluster info provided might be null.
setClusterInfo
in interface ClusterInfoAware
clusterInfo
- The cluster information to be injectedpublic void setBeanName(String beanName)
setBeanName
in interface BeanNameAware
setBeanName
in class PlaceholderConfigurerSupport
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
setBeanFactory
in class PlaceholderConfigurerSupport
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException
processProperties
in class PropertyPlaceholderConfigurer
BeansException
Copyright © GigaSpaces.