1

我项目的配置是:spring-cloud-dependencies是Dalston.RELEASE,springboot是1.5.8.RELEASE;依赖项如:

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

像这样的代码:

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class DemoApplication {

public static void main(String[] args) {
    SpringApplication.run(DemoApplication.class, args);
}

@GetMapping("/test/getId")
public String getId(@RequestParam("id") String id){

    return "return the id is:"+id;
}
}

consul 正在运行(consul.exe agent -dev),运行项目时,consul 显示日志:

    2018/08/09 15:49:59 [WARN] agent: Check "service:mdp-service-release-flatform-provider-cache-redis-dev-dev-9098" is now critical

我不能消费提供者,怎么了?

4

0 回答 0