Skip to content

Commit

Permalink
GH-8697: No autowire for Int ConversionService
Browse files Browse the repository at this point in the history
Fixes #8697

The `IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME` is not designed
for end-user code autowire, rather internal framework requirement

* Mark `BeanDefinition` for `IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME`
as `setAutowireCandidate(false)`
  • Loading branch information
artembilan committed Aug 8, 2023
1 parent 27e71ab commit f9dc75c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ public void initialize(ConfigurableListableBeanFactory beanFactory) throws Beans
}

if (!registry.containsBeanDefinition(IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME)) {
RootBeanDefinition beanDefinition = new RootBeanDefinition(CustomConversionServiceFactoryBean.class);
beanDefinition.setAutowireCandidate(false);
registry.registerBeanDefinition(IntegrationUtils.INTEGRATION_CONVERSION_SERVICE_BEAN_NAME,
new RootBeanDefinition(CustomConversionServiceFactoryBean.class));
beanDefinition);
}

}

private static boolean isIntegrationConverter(BeanDefinition beanDefinition) {
Expand Down

0 comments on commit f9dc75c

Please sign in to comment.