org.openspaces.core.properties
Class BeanLevelPropertyPlaceholderConfigurer
java.lang.Object
org.springframework.core.io.support.PropertiesLoaderSupport
org.springframework.beans.factory.config.PropertyResourceConfigurer
org.springframework.beans.factory.config.PlaceholderConfigurerSupport
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.openspaces.core.properties.BeanLevelPropertyPlaceholderConfigurer
- All Implemented Interfaces:
- ClusterInfoAware, BeanLevelPropertiesAware, Aware, BeanFactoryAware, BeanNameAware, BeanFactoryPostProcessor, Ordered, PriorityOrdered
public class BeanLevelPropertyPlaceholderConfigurer
- extends PropertyPlaceholderConfigurer
- implements BeanNameAware, BeanFactoryAware, BeanLevelPropertiesAware, ClusterInfoAware
An extension on top of Spring 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)
.
- Author:
- kimchy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanLevelPropertyPlaceholderConfigurer
public BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties)
BeanLevelPropertyPlaceholderConfigurer
public BeanLevelPropertyPlaceholderConfigurer(BeanLevelProperties beanLevelProperties,
ClusterInfo clusterInfo)
setBeanLevelProperties
public void setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
- Description copied from interface:
BeanLevelPropertiesAware
- Sets the
BeanLevelProperties
.
- Specified by:
setBeanLevelProperties
in interface BeanLevelPropertiesAware
setClusterInfo
public void setClusterInfo(ClusterInfo clusterInfo)
- Description copied from interface:
ClusterInfoAware
- Sets the cluster information.
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.
- Specified by:
setClusterInfo
in interface ClusterInfoAware
- Parameters:
clusterInfo
- The cluster information to be injected
setBeanName
public void setBeanName(String beanName)
- Specified by:
setBeanName
in interface BeanNameAware
- Overrides:
setBeanName
in class PlaceholderConfigurerSupport
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Overrides:
setBeanFactory
in class PlaceholderConfigurerSupport
processProperties
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
throws BeansException
- Overrides:
processProperties
in class PropertyPlaceholderConfigurer
- Throws:
BeansException
Copyright © GigaSpaces.