当flyway遇到占位符$而报错的时候,解决方案:spring.flyway.placeholder-replacement=false

如果与maven相结合,解决方案:<plugin> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> <version>5.2.4</version> <configuration> <url>jdbc:mysql://localhost:3306/test</url> <user>postgres</user> <password>java</password> <outOfOrder>true</outOfOrder> <baselineOnMigrate>true</baselineOnMigrate> <placeholderReplacement>false</placeholderReplacement> <encoding>UTF-8</encoding> <table>fsl_schema_version</table> <locations> <location>db/migration/</location> </locations> </configuration> </plugin>

在termal处执行命令:mvn flyway:migrate

09-06 10:27