{"id":2974,"date":"2018-08-09T12:00:18","date_gmt":"2018-08-09T04:00:18","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2974"},"modified":"2018-08-09T12:00:18","modified_gmt":"2018-08-09T04:00:18","slug":"spring-cloud-%e6%95%99%e7%a8%8b%e7%ac%ac%e4%b8%83%e7%ab%a0-ribbon-%e7%9a%84%e8%b4%9f%e8%bd%bd%e5%9d%87%e8%a1%a1%e6%9c%8d%e5%8a%a1%e8%b0%83%e7%94%a8%e4%b8%8e-feign-%e7%9a%84%e5%8c%ba%e5%88%ab","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2974","title":{"rendered":"Spring Cloud \u6559\u7a0b\u7b2c\u4e03\u7ae0 Ribbon \u7684\u8d1f\u8f7d\u5747\u8861\u670d\u52a1\u8c03\u7528\u4e0e Feign \u7684\u533a\u522b"},"content":{"rendered":"<p>\n\t\u8fd9\u4e00\u7ae0\u6211\u60f3\u5199 Ribbon\uff0c\u6587\u7ae0\u7684\u6807\u9898\u6211\u60f3\u4e86\u5f88\u4e45\uff0c\u4e5f\u6ca1\u60f3\u51fa\u66f4\u597d\u7684\u6807\u9898\uff0c\u4e8e\u662f\u5c31\u968f\u4fbf\u8d77\u4e86\u4e00\u4e2a\u6807\u9898\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u7684\u89e3\u91ca\u5982\u4f55\u4f7f\u7528 Ribbon \u7684\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\u6765\u8c03\u7528\u670d\u52a1\u3002\n<\/p>\n<p>\n\t\u5728\u5199 Ribbon \u4e4b\u524d\uff0c\u6211\u4eec\u5df2\u7ecf\u7528\u8fc7 Feign \u6765\u5bf9\u5404\u4e2a\u670d\u52a1\u8fdb\u884c\u8c03\u7528\u6765\u3002\u672c\u6587\u5c06\u5728\u524d\u9762 Feign \u7684\u57fa\u7840\u4e0a\u6765\u9610\u8ff0 Ribbon \u5bf9\u670d\u52a1\u7684\u8c03\u7528\uff0c\u670d\u52a1\u6ce8\u518c\u7528\u7684\u662f\u4e4b\u524d\u5199\u7684&nbsp;<a href=\"https:\/\/github.com\/xmt1139057136\/xttblog-cloud\/tree\/master\/xttblog-eureka-server\">xttblog-eureka-server<\/a>\uff0c\u670d\u52a1\u63d0\u4f9b\u8005\u7528\u5230\u4e86&nbsp;<a href=\"https:\/\/github.com\/xmt1139057136\/xttblog-cloud\/tree\/master\/xttblog-cloud-producer\" id=\"9424eddbc95871ee7c06d2fa4c8d2262-c40ed33861482271e57786d0cf8740f6f9c1681e\" title=\"xttblog-cloud-producer\">xttblog-cloud-producer<\/a>\u3002\n<\/p>\n<p>\n\t\u5728\u4e0a\u9762\u4e24\u4e2a\u6848\u4f8b\u7684\u57fa\u7840\u4e0a\uff0c\u6211\u4eec\u518d\u65b0\u5efa\u4e00\u4e2a xttblog-cloud-producer2 \u5de5\u7a0b\u3002\u8be5\u5de5\u7a0b\u7684 pom.xml \u548c java \u4ee3\u7801\u90fd\u662f\u4e00\u6837\u7684\uff0c\u53ea\u662f application.yml \u4e2d\u5bf9\u7aef\u53e3\u505a\u4e86\u4e00\u4e0b\u4fee\u6539\u3002\u56e0\u4e3a\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u8fd0\u884c\uff0c\u7aef\u53e3\u4e0d\u80fd\u51b2\u7a81\u3002\n<\/p>\n<pre class=\"brush:plain;\">\r\nserver:\r\n  port: 8889\r\n\r\neureka:\r\n  instance:\r\n    hostname: localhost\r\n  client:\r\n    serviceUrl:\r\n      defaultZone: http:\/\/${eureka.instance.hostname}:8761\/eureka\/\r\n\r\nspring:\r\n  application:\r\n    name: xttblog-cloud-producer<\/pre>\n<p>\n\t\u7136\u540e\u6211\u4eec\u65b0\u5efa\u4e00\u4e2a&nbsp;xttblog-cloud-ribbon \u5de5\u7a0b\uff0c\u6765\u7528\u89e3\u91ca ribbon \u548c feign \u7684\u533a\u522b\u3002\u76f8\u5173\u7684 pom.xml \u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;properties&gt;\r\n    &lt;project.build.sourceEncoding&gt;UTF-8&lt;\/project.build.sourceEncoding&gt;\r\n    &lt;project.reporting.sourceEncoding&gt;UTF-8&lt;\/project.reporting.sourceEncoding&gt;\r\n    &lt;java.version&gt;1.8&lt;\/java.version&gt;\r\n&lt;\/properties&gt;\r\n\r\n&lt;parent&gt;\r\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.5.13.RELEASE&lt;\/version&gt;\r\n&lt;\/parent&gt;\r\n\r\n&lt;dependencyManagement&gt;\r\n    &lt;dependencies&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;spring-cloud-dependencies&lt;\/artifactId&gt;\r\n            &lt;version&gt;Edgware.SR4&lt;\/version&gt;\r\n            &lt;type&gt;pom&lt;\/type&gt;\r\n            &lt;scope&gt;import&lt;\/scope&gt;\r\n        &lt;\/dependency&gt;\r\n    &lt;\/dependencies&gt;\r\n&lt;\/dependencyManagement&gt;\r\n\r\n&lt;dependencies&gt;\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-cloud-starter-config&lt;\/artifactId&gt;\r\n    &lt;\/dependency&gt;\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-cloud-starter-eureka&lt;\/artifactId&gt;\r\n    &lt;\/dependency&gt;\r\n\r\n    &lt;!-- \u4e0d\u7528 feign\uff0c\u6539\u7528 ribbon --&gt;\r\n    &lt;!-- &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-cloud-starter-feign&lt;\/artifactId&gt;\r\n    &lt;\/dependency&gt; --&gt;\r\n\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-cloud-starter-ribbon&lt;\/artifactId&gt;\r\n    &lt;\/dependency&gt;\r\n&lt;\/dependencies&gt;<\/pre>\n<p>\n\tapplication.yml \u6587\u4ef6\u6539\u52a8\u4e5f\u4e0d\u5927\uff1a\n<\/p>\n<pre class=\"brush:plain;\">\r\nserver:\r\n  port: 7080\r\n\r\neureka:\r\n  instance:\r\n    hostname: localhost\r\n  client:\r\n    serviceUrl:\r\n      defaultZone: http:\/\/${eureka.instance.hostname}:8761\/eureka\/\r\n\r\nspring:\r\n  application:\r\n    name: xttblog-cloud-ribbon<\/pre>\n<p>\n\tSpring boot \u7684\u5165\u53e3\u7c7b\uff0c\u5185\u5bb9\u4e5f\u5f88\u7b80\u5355\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\n@SpringBootApplication\r\n@EnableDiscoveryClient\r\npublic class RibbonApplication {\r\n\r\n    \/\/\u5f00\u542f\u8f6f\u5747\u8861\u8d1f\u8f7d\r\n    @LoadBalanced\r\n    @Bean\r\n    RestTemplate restTemplate() {\r\n        return new RestTemplate();\r\n    }\r\n\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(RibbonApplication.class, args);\r\n    }\r\n}<\/pre>\n<p>\n\tController \u7c7b\u7684\u4ee3\u7801\uff0c\u4e3b\u8981\u662f\u60f3\u901a\u8fc7\u6d4f\u89c8\u5668\u6765\u6d4b\u8bd5\u6d88\u8d39\u8005\u5bf9\u670d\u52a1\u7684\u8c03\u7528\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\n@RestController\r\npublic class RibbonController {\r\n\r\n    @Autowired\r\n    CalService calService;\r\n\r\n    @RequestMapping(&quot;\/test&quot;)\r\n    public String test(@RequestParam Integer a, @RequestParam Integer b){\r\n        return a + &quot;+&quot; + b + &quot;\u7684\u8ba1\u7b97\u7ed3\u679c\u4e3a\uff1a&quot; + calService.add(a, b);\r\n    }\r\n}<\/pre>\n<p>\n\tService \u7684\u63a5\u53e3\u7c7b\u548c\u5b9e\u73b0\u7c7b\u90fd\u5f88\u7b80\u5355\uff0c\u6211\u5c31\u8d34\u5728\u4e00\u8d77\u4e86\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\npublic interface CalService {\r\n    Integer add(Integer a, Integer b);\r\n}\r\n@Service\r\npublic class CalServiceImpl implements CalService {\r\n\r\n    @Autowired\r\n    private RestTemplate restTemplate;\r\n\r\n    @Autowired\r\n    private LoadBalancerClient loadBalancerClient;\r\n\r\n    @Override\r\n    public Integer add(Integer a, Integer b) {\r\n        String reqURL = &quot;http:\/\/xttblog-cloud-producer\/cal\/add?a=&quot; + a + &quot;&amp;b=&quot; + b;\r\n        test();\r\n        return restTemplate.getForEntity(reqURL, Integer.class).getBody();\r\n    }\r\n\r\n    private void test(){\r\n        ServiceInstance serviceInstance = loadBalancerClient.choose(&quot;xttblog-cloud-producer&quot;);\r\n        System.out.println(&quot;Host\uff1a&quot; + serviceInstance.getHost()\r\n                + &quot;\uff0cServiceId\uff1a&quot; + serviceInstance.getServiceId()\r\n                + &quot;\uff0cPort\uff1a&quot; + serviceInstance.getPort());\r\n    }\r\n}<\/pre>\n<p>\n\t\u4ee5\u4e0a\u4ee3\u7801\u5199\u5b8c\u540e\uff0c\u6211\u4eec\u4f9d\u6b21\u542f\u52a8\uff1axttblog-eureka-server\u3001xttblog-cloud-producer\u3001xttblog-cloud-producer2\u3001xttblog-cloud-ribbon\u3002\n<\/p>\n<p>\n\t\u7136\u540e\u6d4f\u89c8\u5668\u91cc\u8bbf\u95ee&nbsp;http:\/\/localhost:8761\/\uff0c\u5c31\u4f1a\u770b\u5230\u4e00\u4e0b\u5185\u5bb9\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka09.png\" style=\"width: 1214px;height: 295px\" \/>\n<\/p>\n<p>\n\t\u518d\u63a5\u4e0b\u6765\u4e00\u6b65\uff0c\u6211\u4eec\u6d4f\u89c8\u5668\u91cc\u8bbf\u95ee&nbsp;http:\/\/localhost:7080\/test?a=1&amp;b=2\u3002\u4f1a\u628a\u8ba1\u7b97\u7ed3\u679c\u663e\u793a\u5230\u6d4f\u89c8\u5668\u4e0a\uff1a\n<\/p>\n<pre class=\"brush:plain;\">\r\n1+2\u7684\u8ba1\u7b97\u7ed3\u679c\u4e3a\uff1a3<\/pre>\n<p>\n\t\u591a\u6b21\u5237\u65b0\u8bbf\u95ee\u540e\uff0c\u63a7\u5236\u53f0\u4e0a\u6253\u5370\u51fa\u4e86\u4e00\u4e9b\u8bbf\u95ee\u670d\u52a1\u7684\u5177\u4f53\u4fe1\u606f\uff1a\n<\/p>\n<pre class=\"brush:plain;\">\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8889\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8888\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8888\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8888\r\nHost\uff1alocalhost\uff0cServiceId\uff1axttblog-cloud-producer\uff0cPort\uff1a8888<\/pre>\n<p>\n\t\u6839\u636e\u4e0a\u9762\u7684\u4fe1\u606f\uff0c\u6211\u4eec\u53ef\u4ee5\u5224\u65ad\u51fa&nbsp;@LoadBalanced \u9ed8\u8ba4\u4f7f\u7528\u7684\u662f\u968f\u673a\u8bbf\u95ee\u7684\u8d1f\u8f7d\u5747\u8861\u7b56\u7565\u3002\n<\/p>\n<p>\n\t\u518d\u7ed3\u5408\u524d\u9762\u7b2c\u4e94\u7ae0\u7684\u5185\u5bb9\u300a<a href=\"http:\/\/www.xttblog.com\/?p=2970\" rel=\"nofollow\">Spring Cloud \u6559\u7a0b\u7b2c\u4e94\u7ae0 Feign \u7684\u58f0\u660e\u5f0f\u670d\u52a1\u8c03\u7528\u4e0e\u8d1f\u8f7d\u5747\u8861<\/a>\u300b\uff0c\u53ef\u4ee5\u770b\u51fa Feign \u548c Ribbon \u4e4b\u95f4\u7684\u5de8\u5927\u5dee\u5f02\u3002\u603b\u7ed3\u4e00\u4e0b\uff0c\u53ef\u4ee5\u5f97\u51fa\u4e0b\u9762\u7684\u7ed3\u8bba\uff1a\n<\/p>\n<ul>\n<li>\n\t\tRibbon \u7684\u670d\u52a1\u8c03\u7528\u9700\u8981\u7528\u5230 RestTemplate \u548c httpclient\u3001okHttp \u7b49\u652f\u6301\n\t<\/li>\n<li>\n\t\tFeign \u7684\u8d1f\u8f7d\u5747\u8861\u662f\u501f\u52a9 Ribbon \u6765\u5b9e\u73b0\u7684\n\t<\/li>\n<li>\n\t\tFeign \u7684\u58f0\u660e\u5f0f\u8c03\u7528\uff0c\u6bd4 Ribbon \u7528\u8d77\u6765\u66f4\u65b9\u4fbf\n\t<\/li>\n<\/ul>\n<p>\n\t\u5728\u6b64\u4e4b\u524d\uff0c\u6211\u4e5f\u5728\u7f51\u4e0a\u641c\u7d22\u4e86\u5927\u91cf\u7684\u6587\u7ae0\uff0c\u53d1\u73b0\u5f88\u5c11\u6709\u4eba\u628a Feign \u548c Ribbon \u4e4b\u95f4\u7684\u533a\u522b\u8bf4\u6e05\u695a\u7684\u3002\n<\/p>\n<p>\n\tribbon \u662f\u4e00\u4e2a\u57fa\u4e8e http \u548c tcp \u5ba2\u6237\u7aef\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u53ef\u4ee5\u914d\u7f6e\u5728\u5ba2\u6237\u7aef\uff0c\u4ee5\u8f6e\u8be2\u3001\u968f\u673a\u3001\u6743\u91cd\u7b49\u65b9\u5f0f\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u3002feign \u4f7f\u7528\u8d77\u6765\u66f4\u52a0\u65b9\u4fbf\uff0c\u4e5f\u662f\u4e00\u4e2a http \u5ba2\u6237\u7aef\u8c03\u7528\u63a5\u53e3\u7684\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u76f8\u6bd4\u800c\u8a00 feign \u91cc\u9762\u57fa\u672c\u4e0a\u662f\u5305\u62ec\u4e86 ribbon\uff0c\u8c03\u7528\u7684\u65f6\u5019\u6bd4 ribbon \u4f53\u9a8c\u66f4\u597d\uff0c\u8ba9\u4eba\u611f\u89c9\u4e0d\u5230\u662f\u8fdc\u7a0b\u8c03\u7528\u3002Feign \u66f4\u4e13\u6ce8\u4e8e HTTP \u534f\u8bae\u670d\u52a1\u7684\u8c03\u7528\u3002feign \u662f\u8fdc\u7a0b\u8c03\u7528\u7684,ribbon \u662f\u505a\u8d1f\u8f7d\u5747\u8861\u7684,feign \u53d1\u8bf7\u6c42\u5230\u54ea\u662f ribbon \u51b3\u5b9a\u7684\u3002feign \u5c01\u88c5\u96c6\u6210\u4e86 hystrix \u548c ribbon\uff0c\u652f\u6301\u8d1f\u8f7d\u5747\u8861\u548c\u7194\u65ad\u3002\n<\/p>\n<p>\n\tFeign \u662f\u4e00\u4e2a\u58f0\u660e\u5f0f\u7684REST\u5ba2\u6237\u7aef\uff0c\u5b83\u7684\u76ee\u7684\u5c31\u662f\u8ba9 REST \u8c03\u7528\u66f4\u52a0\u7b80\u5355\u3002Feign \u63d0\u4f9b\u4e86 HTTP \u8bf7\u6c42\u7684\u6a21\u677f\uff0c\u901a\u8fc7\u7f16\u5199\u7b80\u5355\u7684\u63a5\u53e3\u548c\u63d2\u5165\u6ce8\u89e3\uff0c\u5c31\u53ef\u4ee5\u5b9a\u4e49\u597d HTTP \u8bf7\u6c42\u7684\u53c2\u6570\u3001\u683c\u5f0f\u3001\u5730\u5740\u7b49\u4fe1\u606f\u3002\u800c Feign \u5219\u4f1a\u5b8c\u5168\u4ee3\u7406 HTTP \u8bf7\u6c42\uff0c\u6211\u4eec\u53ea\u9700\u8981\u50cf\u8c03\u7528\u65b9\u6cd5\u4e00\u6837\u8c03\u7528\u5b83\u5c31\u53ef\u4ee5\u5b8c\u6210\u670d\u52a1\u8bf7\u6c42\u53ca\u76f8\u5173\u5904\u7406\u3002Spring Cloud \u5bf9Feign \u8fdb\u884c\u4e86\u5c01\u88c5\uff0c\u4f7f\u5176\u652f\u6301 SpringMVC \u6807\u51c6\u6ce8\u89e3\u548c HttpMessageConverters\u3002Feign \u53ef\u4ee5\u4e0e Eureka \u548c Ribbon \u7ec4\u5408\u4f7f\u7528\u4ee5\u652f\u6301\u8d1f\u8f7d\u5747\u8861\u3002\n<\/p>\n<p>\n\tRibbon \u548c Feign \u90fd\u662f\u7528\u4e8e\u8c03\u7528\u5176\u4ed6\u670d\u52a1\u7684\uff0c\u4e0d\u8fc7\u65b9\u5f0f\u4e0d\u540c\u3002\n<\/p>\n<ul>\n<li>\n\t\t\u542f\u52a8\u7c7b\u4f7f\u7528\u7684\u6ce8\u89e3\u4e0d\u540c\uff0cRibbon \u7528\u7684\u662f @RibbonClient\uff0cFeign \u7528\u7684\u662f @EnableFeignClients\u3002\n\t<\/li>\n<li>\n\t\t\u670d\u52a1\u7684\u6307\u5b9a\u4f4d\u7f6e\u4e0d\u540c\uff0cRibbon \u662f\u5728 @RibbonClient \u6ce8\u89e3\u4e0a\u58f0\u660e\uff0cFeign \u5219\u662f\u5728\u5b9a\u4e49\u62bd\u8c61\u65b9\u6cd5\u7684\u63a5\u53e3\u4e2d\u4f7f\u7528 @FeignClient \u58f0\u660e\u3002\n\t<\/li>\n<li>\n\t\t\u8c03\u7528\u65b9\u5f0f\u4e0d\u540c\uff0cRibbon \u9700\u8981\u81ea\u5df1\u6784\u5efa http \u8bf7\u6c42\uff0c\u6a21\u62df http \u8bf7\u6c42\u7136\u540e\u4f7f\u7528 RestTemplate \u53d1\u9001\u7ed9\u5176\u4ed6\u670d\u52a1\uff0c\u6b65\u9aa4\u76f8\u5f53\u7e41\u7410\u3002\n\t<\/li>\n<\/ul>\n<p>\n\tFeign \u5219\u662f\u5728 Ribbon \u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u4e00\u6b21\u6539\u8fdb\uff0c\u91c7\u7528\u63a5\u53e3\u7684\u65b9\u5f0f\uff0c\u5c06\u9700\u8981\u8c03\u7528\u7684\u5176\u4ed6\u670d\u52a1\u7684\u65b9\u6cd5\u5b9a\u4e49\u6210\u62bd\u8c61\u65b9\u6cd5\u5373\u53ef\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u6784\u5efa http \u8bf7\u6c42\u3002\u4e0d\u8fc7\u8981\u6ce8\u610f\u7684\u662f\u62bd\u8c61\u65b9\u6cd5\u7684\u6ce8\u89e3\u3001\u65b9\u6cd5\u7b7e\u540d\u8981\u548c\u63d0\u4f9b\u670d\u52a1\u7684\u65b9\u6cd5\u5b8c\u5168\u4e00\u81f4\u3002\n<\/p>\n<p>\n\t\u672c\u6587\u76f8\u5173\u6e90\u7801\u5df2\u4e0a\u4f20\u81f3\uff1a<a href=\"https:\/\/github.com\/xmt1139057136\/xttblog-cloud\" name=\"Spring Cloud \u6559\u7a0b\u6e90\u7801\" target=\"_blank\" title=\"Spring Cloud \u6559\u7a0b\u6e90\u7801\">https:\/\/github.com\/xmt1139057136\/xttblog-cloud<\/a><\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2974\">Spring Cloud \u6559\u7a0b\u7b2c\u4e03\u7ae0 Ribbon \u7684\u8d1f\u8f7d\u5747\u8861\u670d\u52a1\u8c03\u7528\u4e0e Feign \u7684\u533a\u522b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e00\u7ae0\u6211\u60f3\u5199 Ribbon\uff0c\u6587\u7ae0\u7684\u6807\u9898\u6211\u60f3\u4e86\u5f88\u4e45\uff0c\u4e5f\u6ca1\u60f3\u51fa\u66f4\u597d\u7684\u6807\u9898\uff0c\u4e8e\u662f\u5c31\u968f\u4fbf\u8d77\u4e86\u4e00\u4e2a\u6807\u9898\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u7684\u89e3\u91ca [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1642,1659,1660,588,1522],"class_list":["post-2974","post","type-post","status-publish","format-standard","hentry","category-java","tag-eureka","tag-feign","tag-ribbon","tag-spring-cloud","tag-springboot"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2974"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2974\/revisions"}],"predecessor-version":[{"id":2975,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2974\/revisions\/2975"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}