简体   繁体   中英

Spring-boot stop application when internal error occurs

I have written the spring boot application . For my application configuration is mandatory which is loading the from the databases . If the application is started when the Databases is down, I want to stop the application by throwing exception . How Do I stop the spring-boot application .

Programmatically shut down Spring Boot application. This question has already been answered here.

Programmatically shut down Spring Boot application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM