API: Make it possible to use pre-instantiated Java-based migrations
See original GitHub issueHi,
as we are using Spring with Flyway we want to use other beans inside the SpringJdbcMigration
s. Therefore we created a new resolver which retrieves the SpringJdbcMigration
s from the Spring application context. This way we are able to define the migrations inside the application context and reference other beans we would need for this migration inside the SpringJdbcMigraiton
with the dependency injection mechanisms of Spring (@Autowired
). Please have a look at the linked pull request and the tests how this is done.
If this pull request is accepted and integrated, then I would also add some documentation to the website project of Flyway on how to use this new resolver.
Thanks and regards,
Guy
Issue Analytics
- State:
- Created 8 years ago
- Reactions:9
- Comments:26 (2 by maintainers)
Top Results From Across the Web
hooks - Flyway by Redgate • Database Migrations Made Easy.
The Flyway API lets you pass pre-instantiated Java-based migrations using the javaMigrations property. Spring users can use this to automatically use all ...
Read more >Use an SQL migration file in the Flyway Java API
I created a java class and inherited from the JdbcMigrations class and the ClassPathScanner picks that up just fine. What do I need...
Read more >Migrate on-premises Java applications to AWS using AWS ...
Remotely migrate on-premises Java based applications to the AWS Cloud using AWS App2Container with a worker machine.
Read more >Tutorial | Building REST services with Spring
REST has quickly become the de-facto standard for building web services on the web because they're easy to build and easy to consume....
Read more >Using Pre-Authenticated Requests - Oracle Help Center
Oracle Cloud Infrastructure Object Storage service's pre-authenticated request ... requests using the Console, CLI, or by using an SDK to access the API....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@axelfontaine Could you help to provide one example to show how to inject spring bean into class implementation of JavaMigration interface?
Thanks, Simon
This has now been implemented generically using a new
javaMigrations
property in the API.Spring users can use this to automatically use all
JavaMigration
Spring beans with Flyway: