turbine.stream一直是ping……

版权声明:转载请注明出处和署名,谢谢! https://blog.csdn.net/MobiusStrip/article/details/82771069

turbine.stream一直是ping

  • 错误原因:
    • 因为没有请求任何东西,所以看不到内容;
    • 缺少配置监控的依赖
    • Eureka服务注册中心未将自己作为客户端来尝试注册它自己
    # 注册Eureka服务
    eureka:
      client:
        register-with-eureka: false
        fetch-registry: false
    
    • 缺少配置监控的依赖
  • 解决办法:
    • 访问一下其他服务,比如http://localhost:9000/goods/2(自己写的一个服务)即可看到内容
    • 客服端添加依赖
    	<!-- Actuator是SpringBoot提供的对应用系统的自省和监控的集成功能,可以查看应用配置的详细信息;
        如果提示 Unable to connect to Command Metric Stream.则需要引入以下包!
     	-->
     <dependency>
     	<groupId>org.springframework.boot</groupId>
     	<artifactId>spring-boot-starter-actuator</artifactId>
     </dependency> 
    
    • Eureka服务注册中心未将自己作为客户端来尝试注册它自己
    # 注册Eureka服务
    eureka:
      client:
    #    register-with-eureka: false
    #    fetch-registry: false
    
    • 添加配置的依赖
    <dependency>
    	<groupId>org.springframework.boot</groupId>
    	<artifactId>spring-boot-starter-actuator</artifactId>
    </dependency> 
    
    

猜你喜欢

转载自blog.csdn.net/MobiusStrip/article/details/82771069