zl程序教程

您现在的位置是:首页 >  后端

当前栏目

springcloud学习的坑

2023-09-27 14:27:23 时间

一:启动Euerka作为提供者或者消费者时,启动失败报:Process finished with exit code 0

         Unregistering application EUREKA-SERVICE with eureka with status DOWN

 

解决:(加入web的依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

然后Euerka正常启动,并注入到注册中心:

 Spring cloud有两种服务调用方式,一种是ribbon+restTemplate,另一种是feign。