In my Spring Boot project I want to use flyway-maven-plugin. My pom:
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.1</version>
<configuration>
<url>jdbc:mysql://localhost:3306/my_database?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&connectionCollation=utf8_unicode_ci&characterSetResults=UTF-8</url>
<user>root</user>
<password>${spring.datasource.password}</password>
</configuration>
</plugin>
And here is my application.yml
spring:
profiles.active: default
---
spring:
profiles: default
spring.datasource:
password: root
As I understood to use mvn flyway:info I need some plugin which will read my application.yml. Or maybe there is another way?
I have the following in my src/main/resources/application.properties
flyway.url=jdbc:sqlserver://localhost:1433
flyway.user=james_hetfield
flyway.password=MetaLLic@
spring.datasource.url=${flyway.url}
spring.datasource.user=${flyway.user}
spring.datasource.password=${flyway.password}
And then I run the migrations from the command-line as follows
mvn -Dflyway.configFiles=src/main/resources/application.properties flyway:migrate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With