解决springboot2.x项目添加@EnableDiscoveryClient注解找不到的问题

环境:

IDEA

maven3.0

springboot2.2.0

特别注意springboot的版本,1.0和2.0有很大区别

解决办法:

pom添加:

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            <version>2.1.1.RELEASE</version>
        </dependency>

原文地址:https://www.cnblogs.com/yadongliang/p/13721926.html