I'm using Spring Boot + Spring Task Scheduler to creating a polling application. I plan to use the actuator to shutdown the application during maintenance windows (see shutdown endpoint for actuator: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-endpoints).
My question is, will the Spring be smart enough finish an in-flight task before gracefully shutting down the application? Will Spring be smart enough not to start another task if the in-flight task completes before shutdown?
Thank you.