In 24.6 Using YAML instead of Properties of Link [1] YAML files are mentioned
as a nice replacement of properties files.

And strangely
    @Value("${myProperty}")
    private String myProperty;

decodes the value in any case.


Regarding [2] I experimented with both:

@TestPropertySource(locations="classpath:test.properties")
and 
@ActiveProfiles("test")

to provide a different Property source. However, none seemed to work.

But I found out that:

        @Value("${myProperty}")
        private String filePath;

        @Override
        public void configure() throws Exception {
                String route = "file:"+ filePath + "/?noop=true\"";
                from(route) // FILE PATH FROM PROPERTIES

instead of {{myProperty}} directly is used the Test works!

But I do not (yet) understand why this works.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Properties-Spring-Boot-Unit-test-not-found-tp5779765p5779789.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to