一尘不染

将SpringBoot从2.1.1升级到2.1.2时出错

spring-boot

我有一个带有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

我究竟做错了什么?


阅读 716

收藏
2020-05-30

共1个答案

一尘不染

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

2020-05-30