How to prevent Spring Boot daemon/server application from closing/shutting down immediately?

前端 未结 9 724
不知归路
不知归路 2020-12-03 01:10

My Spring Boot application is not a web server, but it\'s a server using custom protocol (using Camel in this case).

But Spring Boot immediately stops (gracefully) a

9条回答
  •  一整个雨季
    2020-12-03 02:09

    All threads are completed, the program will close automatically. So, register an empty task with @Scheduled will create a loop thread to prevent shutdown.

提交回复
热议问题