@Override
public void postProcessBeanFactory(final ConfigurableListableBeanFactory beanFactory) throws BeansException {
super.postProcessBeanFactory(beanFactory);
final StandardServletEnvironment propertySources =
(StandardServletEnvironment) super.getAppliedPropertySources().get(ENVIRONMENT_PROPERTIES).getSource();
propertySources.getPropertySources().forEach(propertySource -> {
if (propertySource.getSource() instanceof Map) {
// it will print systemProperties, systemEnvironment, application.properties and other overrides of
// application.properties
log.trace("#######" + propertySource.getName() + "#######");
//noinspection unchecked
((Map) propertySource.getSource()).forEach((key, value) -> log.trace(key+"="+value));
}
});
}
PropertiesLoaderConfigurer.java 文件源码
java
阅读 14
收藏 0
点赞 0
评论 0
项目:ZombieLib2
作者:
评论列表
文章目录