You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/03/23 08:51:00 UTC

[jira] [Resolved] (CAMEL-16230) Placeholders not Working with CamelSpringBootTest and AdviceWith

     [ https://issues.apache.org/jira/browse/CAMEL-16230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-16230.
---------------------------------
    Resolution: Fixed

> Placeholders not Working with CamelSpringBootTest and AdviceWith
> ----------------------------------------------------------------
>
>                 Key: CAMEL-16230
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16230
>             Project: Camel
>          Issue Type: Improvement
>          Components: tests
>    Affects Versions: 3.7.2
>            Reporter: Alex
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.10.0
>
>
> Unable to use camel placeholders in a CamelSpringBootTest:
>  This does not work:
> {code}
>         AdviceWith.adviceWith(camelContext, "person-import", route -> {
>             route.replaceFromWith("direct:csv");
>             route.mockEndpointsAndSkip("{{camel.placeholder}}");
>         });
> {code}
> This does:
> {code}
>         AdviceWith.adviceWith(camelContext, "person-import", route -> {
>             route.replaceFromWith("direct:csv");
>             route.mockEndpointsAndSkip("jpa:MyEntity");
>         });
> {code}
> My route is defined like so:
> {code}
>         from("{{camel.person.csv.file}}")
>                 .id("person-import")
>                 .unmarshal(bindy)
>                 .process(new CamelLogger())
>                 .to("{{camel.placeholder}}")
>         ;
> {code}
> My placeholder is application.yaml of Spring Boot
> {code}
> camel:
>   placeholder: "jpa:MyEntity"
> {code}
> Please advise
> Best Regards
> Alex



--
This message was sent by Atlassian Jira
(v8.3.4#803005)