<plugin>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://127.0.0.1:3306/db_abc</url>
<user>db_user</user>
<sqlMigrationPrefix>V</sqlMigrationPrefix>
</configuration>
</plugin>
我不想在这里提及驱动程序,URL和用户。我已经在src / main / resources上有一个resources.conf。如何在这里使用该文件?
答案 0 :(得分:0)
<plugin>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://127.0.0.1:3306/db_abc</url>
<user>db_user</user>
<sqlMigrationPrefix>V</sqlMigrationPrefix>
</configuration>
<configFiles>
<configFile>myConfig.conf</configFile>
</configFiles>
</plugin>
来自Flyway文档:https://flywaydb.org/documentation/maven/migrate
myConfig.conf:
flyway.url=jdbc:mysql://127.0.0.1:3306/db_abc
请参阅有关飞行通道配置文件的文档:https://flywaydb.org/documentation/configfiles