数据库关闭时如何处理飞路
How to handle flyway when the db is down
这是我第一次使用flyway,我需要帮助。
在微服务的生命周期中,postgres 数据库可以关闭。我想知道 flyway 如何在启动时再次连接到数据库。
据我所知,您可以在配置 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>
}
这是我第一次使用flyway,我需要帮助。 在微服务的生命周期中,postgres 数据库可以关闭。我想知道 flyway 如何在启动时再次连接到数据库。
据我所知,您可以在配置 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>
}