首页 > 解决方案 > 将 SpringBoot 从 2.1.1 升级到 2.1.2 时出错

问题描述

我有一个 SpringBoot 版本的 SpringBoot 应用程序2.1.1.RELEASE。我尝试将其升级到最新版本:2.1.2.RELEASE. 现在我在初始化时遇到错误。源中是否必须更改某些内容?我看到 Spring 版本从 升级5.1.3.RELEASE5.1.4.RELEASE,但我没想到会因为小升级而破坏应用程序的更改。

Caused by: java.lang.IllegalAccessError: tried to access method org.springframework.core.convert.TypeDescriptor.<init>(Lorg/springframework/core/ResolvableType;Ljava/lang/Class;[Ljava/lang/annotation/Annotation;)V from class org.springframework.beans.factory.config.DependencyDescriptor
    at org.springframework.beans.factory.config.DependencyDescriptor.getTypeDescriptor(DependencyDescriptor.java:330) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1192) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
    ... 85 common frames omitted

我究竟做错了什么?

标签: javaspringspring-boot

解决方案


最后,它是对 spring-core 5.1.3.RELEASE 的固定依赖。这导致了错误。


推荐阅读