Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13413

camel-spring: support more camel-contexts by allowing to define primary=true to it

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 3.0.0
    • None
    • camel-spring
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jondruse Jiri Ondrusek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: