How to make Spring server to start even if database is down?

后端 未结 4 982
余生分开走
余生分开走 2021-02-07 00:49

I\'m using a Spring Boot(1.4.7) & MyBatis.

spring.main1.datasource.url=jdbc:mariadb://192.168.0.11:3306/testdb?useUnicode=true&characterEncoding=utf8&         


        
4条回答
  •  旧时难觅i
    2021-02-07 01:18

    Check this blog post for a very good solution: Delay startup of your Spring Boot application until your DB is up.

提交回复
热议问题