Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.15.2
-
None
-
Unknown
Description
The @Bean declaration of CamelContext within CamelAutoConfiguration should be made conditional to allow the user to create it manually if they so desire. This is useful when converting an application using an existing XML-based camelContext, for example.
This would also make camel-spring-boot more consistent with Spring Boot's policy of non-invasive auto-configuration.
The fix is just to add a conditional annotation on the camelContext method, e.g.:
@Bean @ConditionalOnMissingBean(CamelContext.class) CamelContext camelContext(ApplicationContext applicationContext, CamelConfigurationProperties configurationProperties) {