Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
3.0.0
-
None
-
None
-
Unknown
Description
Make possible to define more camelContexts by allowing usage of spring attribute primary=true.
<beans xmlns="http://www.springframework.org/schema/beans"> <camelContext id="context1" xmlns="http://camel.apache.org/schema/spring" primary="true"> ... </camelContext> <camelContext id="context2" xmlns="http://camel.apache.org/schema/spring"> ... </camelContext> </beans>
In case that primary is not set to true, executions ends with error:
*************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of method configureDirectComponent in org.apache.camel.component.direct.springboot.DirectComponentAutoConfiguration required a single bean, but 2 were found: ...
How to reproduce:
Add second cotext to quockstart quickstart https://github.com/fabric8-quickstarts/spring-boot-camel-xml and execute by command mvn spring-boot:run