将 SpringBoot 从 2.1.1 升级到 2.1.2 时出错 [英] Error when upgrading SpringBoot from 2.1.1 to 2.1.2
问题描述
我有一个带有 SpringBoot 版本 2.1.1.RELEASE
的 SpringBoot 应用程序.我尝试将其升级到最新版本:2.1.2.RELEASE
.现在我在初始化时遇到错误.是否必须在源中更改某些内容?我看到 Spring 版本从 5.1.3.RELEASE
升级到 5.1.4.RELEASE
,但我没想到更改会破坏应用程序小升级.
I have a SpringBoot application with SpringBoot version 2.1.1.RELEASE
. I tried to upgrade it to the latest version: 2.1.2.RELEASE
. Now I get an error in initialisation. Does something has to change in the source? I saw that the Spring version is upgraded from 5.1.3.RELEASE
to 5.1.4.RELEASE
, but I wasn't expecting changes that will break the application by just a minor upgrade.
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
我做错了什么?
推荐答案
最终它是对 spring-core 5.1.3.RELEASE 的固定依赖.这导致了错误.
In the end it was an fixed dependency to spring-core 5.1.3.RELEASE. This caused the error.
这篇关于将 SpringBoot 从 2.1.1 升级到 2.1.2 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!