camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel Properties Spring Boot Unit test not found
Date Sat, 26 Mar 2016 15:59:46 GMT
What happens if you have a application.yml file and put the property in there?

camel-spring-boot uses spring's property resolver so its a bit strange
if spring can find it and not camel. What if you use that key in a
spring @Bean is spring able to find it ?

On Sat, Mar 26, 2016 at 3:26 PM, geoHeil <e1225063@student.tuwien.ac.at> wrote:
> Hi,
>
> my Camel properties work fine during normal execution of the software.
> However, when I execute it via JUnit the properties cannot be read anymore.
> As this is a spring boot application I stored the properties in the
> application.yml properties file.
>
> This is the error-message:
> Property with key [myProperty] not found in properties from text:
> file:{{myProperty}}/?noop=true
>
> The following annotations are used for the test class:
> @RunWith(SpringJUnit4ClassRunner.class)
> @SpringApplicationConfiguration(classes = MyClass.class)
> @ActiveProfiles("test")
> and the properties are defined in src/main/resources/application-test.yml
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message