简体   繁体   English

Eureka Spring Boot客户端异常

[英]Eureka Spring Boot client exception

I getting following run time exceptions when i try to run my Springboot eureka client 当我尝试运行我的Springboot eureka客户端时,我得到了以下运行时异常

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; org.springframework.beans.factory.BeanDefinitionStoreException:无法加载bean类:; nested exception is java.lang.IllegalStateException: Annotation @EnableDiscoveryClient found, but there are no implementations. 嵌套异常是java.lang.IllegalStateException:找到@EnableDiscoveryClient注释,但没有实现。 Did you forget to include a starter? 你忘了包括首发吗?

You should add the following starter POM to get all the required dependencies: 您应该添加以下启动POM以获取所有必需的依赖项:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>

When not inheriting from SpringBoot parent POM, add the following in your <dependencyManagement> : 如果不从SpringBoot父POM继承,请在<dependencyManagement>添加以下内容:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>${spring-boot.version}</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM