关闭

ClassNotFoundException: org.springframework.core.annotation.MergedAnnotations$SearchStrategy

别叨叨 1年前 ⋅ 218 阅读
Caused by: java.lang.ClassNotFoundException: org.springframework.core.annotation.MergedAnnotations$SearchStrategy
	at java.net.URLClassLoader.findClass(URLClassLoader.java:591) ~[na:1.8.0_345]
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:957) ~[na:1.8.0_345]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:902) ~[na:1.8.0_345]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) ~[na:1.8.0_345]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:885) ~[na:1.8.0_345]
	... 27 common frames omitted

原因是spring-boot-test版本不一致:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-test</artifactId>
    <version>2.3.1.RELEASE</version>
</dependency>

 

将spring-boot-starter-parent降到相同版本:

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.1.RELEASE</version>
  </parent>

全部评论: 0

    我有话说: