application so that it contains a single, compatible version of org.sp"/>
Correct the classpath of your application so that it contains a single, compatible version of org.sp
项目场景:
在拉取别人新建的Springboot项目, 出现关于Correct the classpath of your application so that it contains a single, compatible version of xxx错误
Description:An attempt was made to call a method that does not exist. The attempt was made from the following location:org.springframework.expression.spel.support.ReflectiveMethodExecutor.<init>(ReflectiveMethodExecutor.java:72)The following method did not exist:org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;The method's class, org.springframework.util.ClassUtils, is available from the following locations:jar:file:/E:/maven/maven-repository/org/springframework/spring-core/5.3.10/spring-core-5.3.10.jar!/org/springframework/util/ClassUtils.classThe class hierarchy was loaded from the following locations:org.springframework.util.ClassUtils: file:/E:/maven/maven-repository/org/springframework/spring-core/5.3.10/spring-core-5.3.10.jarAction:Correct the classpath of your application so that it contains a single, compatible version of org.springframework.util.ClassUtilsDisconnected from the target VM, address: '127.0.0.1:2192', transport: 'socket'Process finished with exit code 1
原因分析:
原因是jar版本冲突 ,如springboot starter parent与下面引用的某些启动器或者其他jar版本不一致,导致缓存了多个jar, 而启动时不知道选取哪个版本的jar导致错误
解决方案:
查看包引用的那个jar包和springbott不匹配,将其改为对应版本
更多推荐
Correct the classpath of your application so that it contains a single, compatib
发布评论