0
votes

I am using flyway 3.0 for db migration. Till now, I used it with SQL scripts only. DB: mySql.

These scripts were stored in src/main/resources under db.migration.

Now I want to add a Java based migration file in order to use Java logic. I would like to use Spring.

Where should I store the classes? I want them to be under src/main/java in my project packages: such as com.XX.YY.db.migration

Can anyone help me with the maven and spring configurations?

Regards, Id

1

1 Answers

1
votes

Have a look at the flyway documentation!

There is a very good example - even for Spring configuration. You can store the classes inside the specified db.migration package. According to the documentation, subpackages are also scanned by flyway.