Avoid registering ConfigurationPropertiesBindingPostProcessor twice

pull/103/head
Dave Syer 11 years ago
parent e4d594cce5
commit 217ec5d564

@ -38,9 +38,11 @@ public class ConfigurationPropertiesBindingPostProcessorRegistrar implements
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
BeanDefinitionRegistry registry) {
BeanDefinition beanDefinition = new RootBeanDefinition(
ConfigurationPropertiesBindingPostProcessor.class);
registry.registerBeanDefinition(BINDER_BEAN_NAME, beanDefinition);
if (!registry.containsBeanDefinition(BINDER_BEAN_NAME)) {
BeanDefinition beanDefinition = new RootBeanDefinition(
ConfigurationPropertiesBindingPostProcessor.class);
registry.registerBeanDefinition(BINDER_BEAN_NAME, beanDefinition);
}
}
}

Loading…
Cancel
Save