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

余生颓废 提交于 2021-01-07 04:11:44

问题


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 ?


回答1:


The org.flywaydb.core.api.callback.FlywayCallback interface was replaced with org.flywaydb.core.api.callback.Callback in 2018, so just update your code to use the new interface.




回答2:


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.



来源:https://stackoverflow.com/questions/63685249/type-org-flywaydb-core-api-callback-flywaycallback-not-present

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!