Reputation: 5142
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
Upvotes: 0
Views: 662
Reputation: 31
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.
Upvotes: 1