|
|
|
@ -148,8 +148,12 @@ public final class ConfigurationPropertiesBean {
|
|
|
|
|
return getAll((ConfigurableApplicationContext) applicationContext);
|
|
|
|
|
}
|
|
|
|
|
Map<String, ConfigurationPropertiesBean> propertiesBeans = new LinkedHashMap<>();
|
|
|
|
|
applicationContext.getBeansWithAnnotation(ConfigurationProperties.class)
|
|
|
|
|
.forEach((beanName, bean) -> propertiesBeans.put(beanName, get(applicationContext, bean, beanName)));
|
|
|
|
|
applicationContext.getBeansWithAnnotation(ConfigurationProperties.class).forEach((beanName, bean) -> {
|
|
|
|
|
ConfigurationPropertiesBean propertiesBean = get(applicationContext, bean, beanName);
|
|
|
|
|
if (propertiesBean != null) {
|
|
|
|
|
propertiesBeans.put(beanName, propertiesBean);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return propertiesBeans;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -163,8 +167,10 @@ public final class ConfigurationPropertiesBean {
|
|
|
|
|
try {
|
|
|
|
|
Object bean = beanFactory.getBean(beanName);
|
|
|
|
|
ConfigurationPropertiesBean propertiesBean = get(applicationContext, bean, beanName);
|
|
|
|
|
if (propertiesBean != null) {
|
|
|
|
|
propertiesBeans.put(beanName, propertiesBean);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|