Example usage for org.springframework.integration.context IntegrationContextUtils DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME

List of usage examples for org.springframework.integration.context IntegrationContextUtils DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME

Introduction

In this page you can find the example usage for org.springframework.integration.context IntegrationContextUtils DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME.

Prototype

String DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME

To view the source code for org.springframework.integration.context IntegrationContextUtils DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME.

Click Source Link

Usage

From source file:org.springframework.integration.config.IntegrationRegistrar.java

/**
 * Register {@code DefaultConfiguringBeanFactoryPostProcessor}, if necessary.
 * @param registry The {@link BeanDefinitionRegistry} to register additional {@link BeanDefinition}s.
 *//*from  w ww.j a  v  a2  s .c om*/
private void registerDefaultConfiguringBeanFactoryPostProcessor(BeanDefinitionRegistry registry) {
    boolean alreadyRegistered = false;
    if (registry instanceof ListableBeanFactory) {
        alreadyRegistered = ((ListableBeanFactory) registry)
                .containsBean(IntegrationContextUtils.DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME);
    } else {
        alreadyRegistered = registry
                .isBeanNameInUse(IntegrationContextUtils.DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME);
    }
    if (!alreadyRegistered) {
        BeanDefinitionBuilder postProcessorBuilder = BeanDefinitionBuilder
                .genericBeanDefinition(DefaultConfiguringBeanFactoryPostProcessor.class);
        BeanDefinitionHolder postProcessorHolder = new BeanDefinitionHolder(
                postProcessorBuilder.getBeanDefinition(),
                IntegrationContextUtils.DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME);
        BeanDefinitionReaderUtils.registerBeanDefinition(postProcessorHolder, registry);
    }
}