*************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration.configureProperties(FlywayAutoConfiguration.java:255) The following method did not exist: 'org.flywaydb.core.api.configuration.FluentConfiguration org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)' The calling method's class, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration, was loaded from the following location: jar:file:/D:/repository/org/springframework/boot/spring-boot-autoconfigure/3.1.0/spring-boot-autoconfigure-3.1.0.jar!/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class The called method's class, org.flywaydb.core.api.configuration.FluentConfiguration, is available from the following locations: jar:file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar!/org/flywaydb/core/api/configuration/FluentConfiguration.class The called method's class hierarchy was loaded from the following locations: org.flywaydb.core.api.configuration.FluentConfiguration: file:/D:/repository/org/flywaydb/flyway-core/9.20.1/flyway-core-9.20.1.jar Action: Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration and org.flywaydb.core.api.configuration.FluentConfiguration Disconnected from the target VM, address: '127.0.0.1:52541', transport: 'socket' Process finished with exit code 1 怎么回事
时间: 2023-08-12 09:07:08 浏览: 525
根据错误信息显示,您的应用程序启动失败,原因是在Flyway配置中存在不兼容的类版本。
具体地,错误信息显示在 `org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration` 类中的 `configureProperties` 方法尝试调用了一个不存在的方法 `org.flywaydb.core.api.configuration.FluentConfiguration.oracleSqlplus(boolean)`。
根据错误信息提供的类加载路径,调用方法的类 `org.flywaydb.core.api.configuration.FluentConfiguration` 的版本为 `9.20.1`,而应用程序加载的 `FlywayAutoConfiguration$FlywayConfiguration` 类来自于 `spring-boot-autoconfigure-3.1.0.jar`。
这意味着您的应用程序使用的Spring Boot版本为3.1.0,但使用的Flyway版本为9.20.1,两者不兼容。
解决此问题的方法是确保您的应用程序使用与Spring Boot 3.1.0兼容的Flyway版本。您可以尝试在您的项目配置中指定适当的Flyway版本,或者根据您的需求升级或降级Spring Boot和Flyway版本以实现兼容性。
请注意,具体的解决方法可能会因您的项目结构和依赖关系而有所不同。如果需要进一步帮助,请提供更多关于您的项目配置和依赖的信息。
阅读全文