【问题标题】:Spring-Boot is not working with FlywaySpring-Boot 不适用于 Flyway
【发布时间】:2015-04-13 04:27:09
【问题描述】:

我正在为基于 Spring 的 Web 应用程序使用 Spring-Boot v1.1.10.RELEASE。我的数据库是 Postgres,并使用 Flyway 进行数据库迁移。

postgres sql脚本文件被flyway-maven-plugin通过以下maven命令成功执行即mvn compile flyway:migrate

但相同的 Postgres sql 脚本文件在通过 Spring-Boot 运行时抛出 PSQLException: ERROR: COPY from stdin failed: The JDBC driver 当前不支持 COPY 操作 错误strong> Application.java 文件。

注意:从 spring-boot 我在新数据库上执行脚本文件,即至少数据库中没有 SCHEMA_VERSION 表。

任何输入?

谢谢, 八极

【问题讨论】:

    标签: postgresql spring-boot flyway


    【解决方案1】:

    默认情况下,Spring Boot 1.1 使用不支持COPY FROM STDIN 的 Flyway 3.0。 3.1支持was added。您可以升级到 Spring Boot 1.2(默认使用 Flyway 3.1)或坚持使用 Spring Boot 1.1 并尝试将 Flyway 的版本覆盖到 3.1。

    【讨论】:

      猜你喜欢
      • 2018-10-18
      • 2018-07-04
      • 2023-03-26
      • 2019-02-24
      • 2016-04-02
      • 2020-03-19
      • 2019-11-18
      • 2015-03-29
      • 2014-12-25
      相关资源
      最近更新 更多