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

Provide ProducerTemplate as Injectable Bean for Camel Main test

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.17.0
    • 3.18.0
    • camel-test
    • None
    • Unknown

    Description

      It would be nice to provide ProducerTemplate as Injectable bean when creating a Camel main test using annotations.

      In test, we will be able to write something like:

      @BeanInject
       ProducerTemplate producerTemplate;
      

      advantages:

      • lifecycle handled by the framework test
      • no need to call context.createProducerTemplate() and destroy it
      • coherence with Camel Spring Boot annotation which is providing
        @Autowired
            ProducerTemplate producerTemplate;

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            apupier Aurélien Pupier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: