spring - 从 Spring Boot 2.4.6 移动到 2.5.4 后出现 IllegalAccessError
问题描述
我正在尝试从 spring boot 2.4.6 升级到 2.5.4 并开始收到以下错误
启动 ApplicationContext 时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。2021-09-28 14:10:37 [main] 错误 osboot.SpringApplication - 应用程序运行失败 org.springframework.beans.factory.BeanCreationException:创建类路径资源中定义的名称为“supplierInitializer”的 bean 时出错 [org/springframework/cloud /stream/function/FunctionConfiguration.class]:init 方法调用失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建名为“inMemorySwaggerResourcesProvider_integrationflow.org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0”的 bean 时出错:调用 init 方法失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException: Error created bean with name ' 在类路径资源 [org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.class] 中定义的 integrationGlobalProperties':通过工厂方法进行的 Bean 实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.springframework.integration.context.IntegrationProperties]:工厂方法“integrationGlobalProperties”抛出异常;嵌套异常是 java.lang.IllegalAccessError: class org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration 试图访问私有方法 'void org.springframework.integration.context.IntegrationProperties.()' (org.springframework.boot.autoconfigure. integration.IntegrationAutoConfiguration 和 org.springframework.integration.context。
无法理解 spring boot 2.5.X 中发生了什么变化,尽管升级到版本 2.4.11 工作正常。
解决方案
我猜你有一个旧版本的 spring-integration-core 库。删除.m2/repository/org/springframework/integration
那应该修复它的所有文件夹。
推荐阅读
- php - 如何在 curl PHP 中假装是一个网站?
- java - 从响应中获取对象列表
- python - 在python中使用循环求和
- reactjs - 尝试在成功注册时重定向
- html - 添加 CSS 属性后,水平规则不显示
- javascript - 如果第一个不起作用,则使用 axios 提出新请求
- c# - 如何将控制台构建添加到 C# Windows 服务应用程序并显示控制台?
- angular - 带有行单击和操作按钮的角度材料表作为单独的操作
- reporting-services - SSRS 报告中损坏的图像框
- labview - myRIO 模块 - 对 FPGA 串行闪存进行编程与仅对 FPGA 进行编程