|
16 | 16 |
|
17 | 17 | package org.springframework.integration.config; |
18 | 18 |
|
19 | | -import java.io.PrintWriter; |
20 | | -import java.io.StringWriter; |
| 19 | +import java.beans.Introspector; |
21 | 20 | import java.util.HashSet; |
22 | | -import java.util.Properties; |
23 | 21 | import java.util.Set; |
24 | 22 | import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy; |
25 | 23 |
|
26 | 24 | import org.springframework.beans.BeansException; |
27 | 25 | import org.springframework.beans.factory.BeanFactory; |
28 | 26 | import org.springframework.beans.factory.HierarchicalBeanFactory; |
29 | | -import org.springframework.beans.factory.SmartInitializingSingleton; |
30 | 27 | import org.springframework.beans.factory.config.BeanDefinition; |
31 | 28 | import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; |
32 | 29 | import org.springframework.beans.factory.config.PropertiesFactoryBean; |
|
74 | 71 | * |
75 | 72 | * @see IntegrationContextUtils |
76 | 73 | */ |
77 | | -public class DefaultConfiguringBeanFactoryPostProcessor |
78 | | - implements BeanDefinitionRegistryPostProcessor, SmartInitializingSingleton { |
| 74 | +public class DefaultConfiguringBeanFactoryPostProcessor implements BeanDefinitionRegistryPostProcessor { |
79 | 75 |
|
80 | 76 | private static final LogAccessor LOGGER = new LogAccessor(DefaultConfiguringBeanFactoryPostProcessor.class); |
81 | 77 |
|
@@ -130,27 +126,13 @@ public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) t |
130 | 126 | registerArgumentResolverMessageConverter(); |
131 | 127 | registerMessageHandlerMethodFactory(); |
132 | 128 | registerListMessageHandlerMethodFactory(); |
| 129 | + registerIntegrationConfigurationReport(); |
133 | 130 | } |
134 | 131 |
|
135 | 132 | @Override |
136 | 133 | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { |
137 | 134 | } |
138 | 135 |
|
139 | | - @Override |
140 | | - public void afterSingletonsInstantiated() { |
141 | | - if (LOGGER.isDebugEnabled()) { |
142 | | - Properties integrationProperties = |
143 | | - IntegrationContextUtils.getIntegrationProperties(this.beanFactory) |
144 | | - .toProperties(); |
145 | | - |
146 | | - StringWriter writer = new StringWriter(); |
147 | | - integrationProperties.list(new PrintWriter(writer)); |
148 | | - StringBuffer propertiesBuffer = writer.getBuffer() |
149 | | - .delete(0, "-- listing properties --".length()); |
150 | | - LOGGER.debug("\nSpring Integration global properties:\n" + propertiesBuffer); |
151 | | - } |
152 | | - } |
153 | | - |
154 | 136 | private void registerBeanFactoryChannelResolver() { |
155 | 137 | if (!this.beanFactory.containsBeanDefinition(ChannelResolverUtils.CHANNEL_RESOLVER_BEAN_NAME)) { |
156 | 138 | this.registry.registerBeanDefinition(ChannelResolverUtils.CHANNEL_RESOLVER_BEAN_NAME, |
@@ -450,6 +432,13 @@ private void registerListMessageHandlerMethodFactory() { |
450 | 432 | } |
451 | 433 | } |
452 | 434 |
|
| 435 | + private void registerIntegrationConfigurationReport() { |
| 436 | + this.registry.registerBeanDefinition(Introspector.decapitalize(IntegrationConfigurationReport.class.getName()), |
| 437 | + BeanDefinitionBuilder.genericBeanDefinition(IntegrationConfigurationReport.class) |
| 438 | + .setRole(BeanDefinition.ROLE_INFRASTRUCTURE) |
| 439 | + .getBeanDefinition()); |
| 440 | + } |
| 441 | + |
453 | 442 | private static BeanDefinitionBuilder createMessageHandlerMethodFactoryBeanDefinition(boolean listCapable) { |
454 | 443 | return BeanDefinitionBuilder.genericBeanDefinition(IntegrationMessageHandlerMethodFactory.class) |
455 | 444 | .addConstructorArgValue(listCapable) |
|
0 commit comments