Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
When you run a spring boot app then it may terminate asap because the main thread is not keep running.
We should make this easy.
And that applies when you code this using the spring boot way with a application class with main.
eg along the lines using this hack for now
@SpringBootApplication public class SampleCamelApplication { public static void main(String[] args) { ConfigurableApplicationContext ctx = new SpringApplicationBuilder().sources(SampleCamelApplication.class).run(args); // keep the JVM running as Camel uses only daemon threads in the sample CamelSpringBootApplicationController controller = ctx.getBean(CamelSpringBootApplicationController.class); controller.blockMainThread(); } }
We should be able to run that without the hack