@Component @ManagedResource public class ConfigurationPropertiesRebinder extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationListener<EnvironmentChangeEvent>, org.springframework.context.ApplicationContextAware
EnvironmentChangeEvent and rebinds beans that were bound to the
Environment using @ConfigurationProperties. When these beans are re-bound and
re-initialized the changes are available immediately to any component that is using the
@ConfigurationProperties bean.for a deeper and optionally more focused refresh of bean components| Constructor and Description |
|---|
ConfigurationPropertiesRebinder(org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor binder) |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getBeanNames() |
void |
onApplicationEvent(EnvironmentChangeEvent event) |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
void |
rebind() |
void |
rebind(String name) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanMetaDataStore(org.springframework.boot.context.properties.ConfigurationBeanFactoryMetaData beans) |
public ConfigurationPropertiesRebinder(org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor binder)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setBeanMetaDataStore(org.springframework.boot.context.properties.ConfigurationBeanFactoryMetaData beans)
beans - the bean meta data to setpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansExceptionpublic Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansException@ManagedOperation public void rebind()
@ManagedOperation public void rebind(String name)
public void onApplicationEvent(EnvironmentChangeEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<EnvironmentChangeEvent>Copyright © 2015 Pivotal Software, Inc.. All rights reserved.