我正在创建eureka发现服务器,但是在尝试运行spring引导应用程序时。tomcat正在抛出以下异常java.lang.classnotfoundexception:com.netflix.discovery.eurekaclientconfig
- Caused by: java.lang.ClassNotFoundException:
com.netflix.discovery.EurekaClientConfig at
java.net.URLClassLoader.findClass(URLClassLoader.java:382)
~[na:1.8.0_211] at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_211]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
~[na:1.8.0_211] at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_211]
... 25 common frames omitted
========================================================================
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.M3</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
暂无答案!
目前还没有任何答案,快来回答吧!