@Component @ManagedResource public class ConfigurationPropertiesRebinder extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<EnvironmentChangeEvent>
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,
ConfigurationPropertiesBeans beans) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getBeanNames() |
Map<String,Exception> |
getErrors()
A map of bean name to errors when instantiating the bean.
|
void |
onApplicationEvent(EnvironmentChangeEvent event) |
void |
rebind() |
boolean |
rebind(String name) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public ConfigurationPropertiesRebinder(org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor binder, ConfigurationPropertiesBeans beans)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public Map<String,Exception> getErrors()
@ManagedOperation public void rebind()
@ManagedOperation public boolean rebind(String name)
public void onApplicationEvent(EnvironmentChangeEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<EnvironmentChangeEvent>
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.