Small colleague project startup error:
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:324)
... 24 common frames omitted
There are basically two reasons for this kind of error:
1. The jar package where the target class is located is not correctly introduced
2. The version conflict of the jar package causes
Find the target jar package in the project dependency package, search for relevant keywords, cloud, as shown in the figure:
view the pom file of the target project, Dependency Analyzer, view Conflicts, and eliminate redundant dependencies.