Search code examples
spring-bootflyway

Type org.flywaydb.core.api.callback.FlywayCallback not present


After upgrading Flyway from 5.2.4 to

compile group: 'org.flywaydb', name: 'flyway-core', version: '6.5.0' 

and running the spring boot app I got the error:

 Unsatisfied dependency expressed through method 'mapDao' parameter 0;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration':
Unexpected exception during bean creation;
nested exception is java.lang.TypeNotPresentException:
Type org.flywaydb.core.api.callback.FlywayCallback not present

If I don't upgrade the app runs with a warning:

Flyway upgrade recommended: PostgreSQL 12.3 is newer than this version of Flyway and support has not been tested.

that I would like to solve

How should I configure the app so that it uses Flyway 6.5 and Spring Boot 2.1.2.RELEASE ?


Solution

  • It doesn't really answer the question but it's acceptable in my situation. I've just updated Spring Boot dependency to 2.2.2 and the error has gone. No changes in the app source code were needed.