1.2.9. 保持应用程序处于活动状态
启用了这个功能的 Camel 应用程序在启动时启动新线程,以便完全通过防止 JVM 终止使应用程序保持处于活动状态。这意味着,在启动带有 Spring Boot 的 Camel 应用程序后,应用程序会等待 Ctrl+C 信号,且不会立即退出。
可以使用 camel.springboot.main-run-controller 到 true 来激活控制器线程。
camel.springboot.main-run-controller = true
使用 web 模块的应用程序(例如,导入 org.springframework.boot:spring-boot-web-starter 模块的应用程序),通常不需要使用这个功能,因为应用程序会由存在其他非守护进程线程而保留。