org.flywaydb.core.internal.exception.FlywaySqlException: Unable to restore original schema

我边里报这个异常是因为项目里使用了读写分离,配置了两个数据源,如果使用了多个数据源 flyway 需要明确指出使用哪个数据源;

解决办法:

配置文件里加上:

spring.flyway.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
spring.flyway.user=root
spring.flyway.password=ENC(62784de17b0904f1b0e6b2c73f343502d6fad6c3b7d0be96b224fc1fccda221d)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

相关文章:

  • 2021-04-19
  • 2021-06-05
  • 2021-09-12
  • 2021-06-04
  • 2021-05-19
  • 2022-01-10
  • 2021-10-21
  • 2021-09-30
猜你喜欢
  • 2021-09-01
  • 2021-11-20
  • 2021-12-31
  • 2021-05-14
  • 2022-01-17
  • 2021-09-28
  • 2021-11-15
相关资源
相似解决方案