Reputation: 92397
I want to make my Spring Boot application robust against database connection errors. If the application starts before the database is available, it should retry to establish the database connection. The same should happen if the database connection gets lost during operation (e. g. database restart, network error ...). And I'm using Flyway migrations, so that Flyway shouldn't start (and throw an exception) until a database connection is available.
How can I do this with Spring Boot (1.5)?
Upvotes: 7
Views: 2477
Reputation: 2349
There is an open ticket for this behavior/issue on the spring-boot tracker https://github.com/spring-projects/spring-boot/issues/4779
Upvotes: 2