@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(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.
|
Set<String> |
getNeverRefreshable() |
void |
onApplicationEvent(EnvironmentChangeEvent event) |
void |
rebind() |
boolean |
rebind(Class type)
WARNING: This method rebinds beans from any context in the hierarchy using the main
application context.
|
boolean |
rebind(String name) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public ConfigurationPropertiesRebinder(ConfigurationPropertiesBeans beans)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic Map<String,Exception> getErrors()
@ManagedOperation public void rebind()
@ManagedOperation public boolean rebind(String name)
public boolean rebind(Class type)
type - bean type to rebind.public void onApplicationEvent(EnvironmentChangeEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<EnvironmentChangeEvent>Copyright © 2022 Pivotal Software, Inc.. All rights reserved.