将SpringBoot从2.1.1升级到2.1.2时出错

时间:2019-01-14 09:34:47

标签: java spring spring-boot

我有一个SpringBoot版本为2.1.1.RELEASE的SpringBoot应用程序。我试图将其升级到最新版本:2.1.2.RELEASE。现在我在初始化时出错。来源是否需要更改?我看到Spring版本已从5.1.3.RELEASE升级到5.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

我在做什么错了?

1 个答案:

答案 0 :(得分:2)

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