我们正在尝试通过build.gradle
依赖项升级项目:
1.5.7
版本到2.3.3
的 Spring 启动Gradle-4.8-all
版本升级到Gradle-6.4.1-all
我们收到以下错误:
Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
Migration V3__Sequence_Table.sql failed
---------------------------------------
SQL State : 42001
Error Code : 42001
Message : Syntax error in SQL statement "DELIMITER[*]
前面提到了JDBC
连接URL
。o.f.c.internal.database.DatabaseFactory : Database: jdbc:mysql://xxxxx:3306/mydb (MySQL 5.7)
现在,它已作如下更改,o.f.c.internal.database.DatabaseFactory : Database: jdbc:h2:mem:testdb (H2 1.4)
这是上述飞行路线迁移错误的原因吗?
最佳答案
问题:Run
文件的jar
命令对此项目存在问题Dspring.config.location=run.properties
这个命令只执行run.properties
解决方案:
代替上面的run
命令,您应该尝试对jar
文件使用此运行命令
Dspring.config.additional-location=run.properties
我为我的项目尝试过,并且运行良好
关于mysql - Spring Boot版本升级-mysql错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64206933/