camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject Re: Camel Route autostartup with Spring Profiles
Date Thu, 12 Mar 2015 22:02:05 GMT
Hello All,
I decided to set all routes autostart to false and then implement an

public class MyListener implements
		ApplicationListener<ContextRefreshedEvent> {

    private CamelContext camelContext; 

	public void onApplicationEvent(ContextRefreshedEvent event) {

This gets a camel context wired into it and you can get the Spring profiles:


>From there you can selectively start routes as you like.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message