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

Placeholders not Working with CamelSpringBootTest and AdviceWith

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.2
    • 3.10.0
    • camel-core
    • None
    • Unknown

    Description

      Unable to use camel placeholders in a CamelSpringBootTest:

       This does not work:

      
              AdviceWith.adviceWith(camelContext, "person-import", route -> {
                  route.replaceFromWith("direct:csv");
                  route.mockEndpointsAndSkip("{{camel.placeholder}}");
              });
      
      

      This does:

              AdviceWith.adviceWith(camelContext, "person-import", route -> {
                  route.replaceFromWith("direct:csv");
                  route.mockEndpointsAndSkip("jpa:MyEntity");
              });
      

      My route is defined like so:

              from("{{camel.person.csv.file}}")
                      .id("person-import")
                      .unmarshal(bindy)
                      .process(new CamelLogger())
                      .to("{{camel.placeholder}}")
              ;
      
      

      My placeholder is application.yaml of Spring Boot

      camel:
        placeholder: "jpa:MyEntity"
      

      Please advise
      Best Regards
      Alex

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            sashok_bg Alex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: