In that case, you should set camel.springboot.main-run-controller = false
And then something like: public static void main(String[] args) { LOGGER.info("God is creating App..."); ConfigurableApplicationContext context = new SpringApplicationBuilder(CamelSpringApplicationMain.class) .web(false) .run(args); LOGGER.info("App is Ready!"); context.getBean(CamelSpringBootApplicationController.class).run(); } The option camel.springboot.main-run-controller make it easy to create camel based applications by keeping the main thread up and running so you do not need to implement your own logic but if oyu need, CamelSpringBootApplicationController is still there to help. --- Luca Burgazzoli On Wed, Apr 20, 2016 at 10:02 AM, Hubertus.Willuhn <hubertus.will...@dinsoftware.de> wrote: > Ok thx, thats correct doing: > > SpringApplication.run(YourMain.class, args); > > works but i need to call web(boolean) because of some dependencies i got > (servlet things)... > however after calling run() like: > > SpringApplication app = new SpringApplication(getClass()); > > // disable web "thinking" > app.setWebEnvironment(false); > > ConfigurableApplicationContext context = app.run(args); > > LOG.info("ready."); > > My App does not "return" meaning it does not print the log entry "ready."... > I need the application context to implement a "dryrun" function. > > Maybe this behavior should be changed because in another "normal" > SpringBootApplication (without Camel Dependencies) i can do: > > log.info("God is creating App..."); > SpringApplication.run(App.class, args); > log.info("App is Ready!"); > > and this works a expected, any thoughts on that? > Maybe I am just missing something? > > Best regards, > > Hubertus > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Spring-Boot-and-Camel-2-17-HangupSupport-Removed-tp5781339p5781405.html > Sent from the Camel - Users mailing list archive at Nabble.com.