赞
踩
前排提示:Disconnected from the target VM是一种常见的错误,导致这个错误可能是方方面面,请根据项目情况和日志进行分析,没有日志的项目建议构建日志。
Connected to the target VM, address: '127.0.0.1:3177', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:3177', transport: 'socket'
Process finished with exit code 1
升级项目的jar包版本,从spring-boot-dependencies从2.1.6.RELEASE升级到2.7.0从而保证引用的spring核心jar包的版本升级从5.1.8.RELEASE升级到5.3.20,升级完成后项目无法启动
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_181] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_181] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_181] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_181] at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration.configurationPropertiesBeans(ConfigurationPropertiesRebinderAutoConfiguration.java:56) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE] at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47.CGLIB$configurationPropertiesBeans$3(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE] at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47$$FastClassBySpringCGLIB$$f09598d2.invoke(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.20.jar:5.3.20] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.20.jar:5.3.20] at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47.configurationPropertiesBeans(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20] ... 32 more
根据项目报错搜索相关文章可知,springboot版本升级后,springcloud的版本没有升级,相应的类在不对应的版本中找不到,升级spring-cloud-dependencies到版本2021.0.0
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2021.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。