Hi, > OK, I can see possible improvement for camel-spring-boot, as well as > small misconfiguration in your project. I'll send more details later > today. Stay tuned :)
I tuned the camel-spring-boot code to postpone the moment of injecting routes until all beans are initialized. This will help to deal with the situations when you inject CamelContext into the configuration creating RoutesBuilder. To be honest this kind of injection (CamelContext into the RoutesBuilder or its config file) is rather the anti-pattern IMHO as routes builders shouldn't be aware of the CamelContext, but after my improvement it is possible. All you need to change in your example now is to swap config files order: @SpringApplicationConfiguration(classes = {CamelConfigurationTest.class, CamelConfiguration.class}) ... instead of ... @SpringApplicationConfiguration(classes = {CamelConfiguration.class, CamelConfigurationTest.class}) You need to load test config before the regular configuration. This is general rule for Spring Java configurations. Let me know if it works for you with new snapshot and swapped configs. Works like a charm on my machine [1] :) . Ping me in case of any additional problems. Cheers. PS Give a moment for our CI server to deploy new snapshots or build it locally from the master branch. [1] http://sd.keepcalm-o-matic.co.uk/i/keep-calm-it-works-on-my-machine-8.png -- Henryk Konsek http://henryk-konsek.blogspot.com