【问题标题】:How to handle flyway when the db is downdb关闭时如何处理flyway
【发布时间】:2021-08-22 06:08:44
【问题描述】:

这是我第一次使用 flyway,我需要帮助。 在微服务的生命周期中,postgres 数据库可以关闭。我想知道flyway启动后如何再次连接到数据库。

【问题讨论】:

    标签: database spring-boot flyway


    【解决方案1】:

    据我所知,您可以在配置 flyway 时使用connectRetries。例如:

    flyway{
        url = <Your url>
        user = <Your user>
        password = <Your password>
        driver = <Mysql/Postgres Driver>
        schemas = <Your schema>]
        connectRetries = 3
        locations = <Migration file location>
    }
    

    【讨论】:

      猜你喜欢
      • 2020-11-13
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 1970-01-01
      • 1970-01-01
      • 2018-11-24
      • 2012-08-27
      • 2019-02-05
      相关资源
      最近更新 更多