报错:org/springframework/core/NativeDetector
java.lang.NoClassDefFoundError: org/springframework/core/NativeDetector
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:180) ~[spring-beans-5.3.6.jar:5.3.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:193) ~[spring-beans-5.3.6.jar:5.3.6]
at org.springframework.context.support.GenericApplicationContext.<init>(GenericApplicationContext.java:113) ~[spring-context-5.3.6.jar:5.3.6]
at org.springframework.web.context.support.GenericWebApplicationContext.<init>(GenericWebApplicationContext.java:81) ~[spring-web-5.3.6.jar:5.3.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.<init>(ServletWebServerApplicationContext.java:118) ~[spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.<init>(AnnotationConfigServletWebServerApplicationContext.java:72) ~[spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.ApplicationContextFactory.lambda$static$0(ApplicationContextFactory.java:48) ~[spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.SpringApplication.createApplicationContext(SpringApplication.java:612) [spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:336) [spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340) [spring-boot-2.4.5.jar:2.4.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) [spring-boot-2.4.5.jar:2.4.5]
at com.vermouth.springcolud.DeptProvider_8001.main(DeptProvider_8001.java:13) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221]
at io.gitlab.wmwtr.springbootdevtools.Restart.RestartLauncher.run(RestartLauncher.java:24) [spring-boot-devtools-1.0.0.RELEASE.jar:na]
Caused by: java.lang.ClassNotFoundException: org.springframework.core.NativeDetector
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_221]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_221]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_221]
... 17 common frames omitted
根据报错的内容去maven中添加缺少的组件
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.6</version>
</dependency>