When I launch my Spring Boot application while the Tomcat's port is already in use, I can see in a log file that java.net.BindException (Address already in use) is thrown, but the application still continues to run (the Java process is still up). Is there any way that I can terminate the application within its code when the Tomcat server fails to start?