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

Placeholders not Working with CamelSpringBootTest and AdviceWith

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.2
    • Fix Version/s: 3.10.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: