# feigndemo1 **Repository Path**: johnnyliu123/feigndemo1f ## Basic Information - **Project Name**: feigndemo1 - **Description**: feign feichanghao d kjia - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: c1 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-04-20 - **Last Updated**: 2023-04-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # springcloud-chapter05-01 #### 介绍 组长:刘政奇 组员 :马智龙、刘洋、徐海华、张理毅、肖李焕 第五章服务容错保护库 Hystrix 基于Feign中使用 教材P70 Feign组件包含了Hystrix 熔断功能,但需要配置启用 需要**重点掌握** #### 软件架构 软件架构说明 #### 安装教程 Feign客户端配置 ```yaml server: port: 8764 spring: application: name: eureka-hystrix-client eureka: client: service-url: defaultZone: http://localhost:7000/eureka/ instance: hostname: localhost feign: hystrix: enabled: true ``` 1. 运行 Eureka Server 2. 运行 hello-provider 3. 运行 eureka-hystrix-client,发请求测试效果 4. 停止 hello-provider 5. 发请求测试效果 #### 效果 ![输入图片说明](stroe2.PNG) ![输入图片说明](stroe5.PNG) 停止 hello-provider 后的效果 ![输入图片说明](stroe3.PNG) ![输入图片说明](stroe4.PNG) #### 监控效果图 ![输入图片说明](stroe7.PN 截图 ![输入图片说明](stroe1.PNG) ![输入图片说明](stroe6.PNG)G) 实验步骤 1.刘政奇负责运行server 2.马智龙、徐海华、肖李焕、张理毅、刘洋运行CLient和provider 3.当provider运行时,没有在链接上输入id或者name时会被hystirx进行熔断输出错误信息,保证其他provider和Client能够正常运行 4.通过a64:8764/hello?name=jack为name赋值并显示信息,刷新链接显示其他Client的信息 5.通过a63:8764/hystrix注册检测器,对服务器进行监测