我需要将spring boot从2.3.7升级到2.4.1。释放。当我更新pom文件时,在spring-security-oauth2依赖项(版本2.4.1.RELEASE)中出现错误。在升级spring版本spring-security-oauth2 2.4.1之前。版本,与springboot 2.3.7配合良好。释放
我的pom文件依赖项:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath />
</parent>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.4.1.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>spring-security-core</artifactId>
<groupId>org.springframework.security</groupId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
当我尝试运行我的应用程序时,这是我的例外-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]: Factory method 'configurationPropertiesBeans' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1179) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:244) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:767) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:572) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar:2.4.1]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.1.jar:2.4.1]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.1.jar:2.4.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.1.jar:2.4.1]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144) ~[spring-boot-2.4.1.jar:2.4.1]
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:203) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:114) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:71) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.3.2.jar:5.3.2]
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82) ~[spring-boot-2.4.1.jar:2.4.1]
at
如何更新springboot版本而不受此依赖性的影响?
问题是您的Spring Cloud和Spring boot版本不兼容,请升级您的Spring Cloud版本以兼容Spring boot 2.4. x。
参考:springboot从2.3.5升级。发布到2.4.1-ClassNotFoundException:org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
在将Spring3升级到Spring4.2.4.Release和Hibernate 4.0.1.Final时,出现了以下编译错误: XmlWebApplicationContext-上下文初始化期间遇到异常-取消刷新尝试: Spring-Context:
pom.xml 与Spring Boot starter父级相关的最新升级版本
我们使用Java1.8,Spring启动1.5.4。与骆驼2.17.1发布。由于这是一个非常古老的版本,团队希望升级到最新的Spring Boot(2.4.X)和骆驼(3.4.2),但由于一些截止日期问题,我们现在只能升级Spring Boot。 作为此链接,请启动。io,它提供了有关仅适用于驼峰版本3的带驼峰的Spring Boot兼容范围的信息。X.X以后。 Can Spring Boot 2
问题内容: 我正在尝试将Eclipse环境更新为Java8。我安装了jdk和jre版本8。我也这样做: https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler 然后在项目中->属性-> Java构建路径-> JRE系统库->编辑->执行环境-> JavaSE-1.8(unbound),这是名称中唯一带有Java 8的选项。但是,
我刚开始穿春靴。我正在尝试将spring boot 1.5.10升级到2.1.11。现在我有这个错误,我不知道如何修复它 重新启动应用程序类时发生异常。 线程“main”java.lang.Reflect.InvocationTargetException在sun.reflect.nativeMethodAccessorImpl.Invoke(nativeMethodAccessorImpl.ja
问题内容: 我正在从码头8升级到码头9,并且遇到了一些API中编译失败的问题。 SslSelectChannelConnector已被删除,从我看到的带有secureRequestCustomizer的httpConfiguration替换了它。 但是我在这两种方法上找不到很多方法。例如 setRequestBufferSize setResponseBufferSize setAcceptors