AbstractDiscoveryClientOptionalArgs需要两个依赖spring-boot-starter-web,spring-cloud-starter-netflix-eureka-client
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>