I\'m trying to inject component of configuration properties in the flyway migration java code but it always null.
I\'m using spring boot with Flyway.
In short do not autowire beans in your db migrations or even reference classes from your application! If you refactor/delete/change classes you referenced in the migration it may not even compile or worse corrupt your migrations.
The overhead of using plain JDBC template for the migrations is not worth the risk.