{"id":2968,"date":"2018-08-07T16:48:38","date_gmt":"2018-08-07T08:48:38","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2968"},"modified":"2018-08-07T16:48:38","modified_gmt":"2018-08-07T08:48:38","slug":"spring-cloud-%e6%95%99%e7%a8%8b%e7%ac%ac%e5%9b%9b%e7%ab%a0-eureka-%e7%9a%84%e5%8e%9f%e7%90%86%e4%b8%8e%e5%ae%9e%e7%8e%b0%e6%9c%ba%e5%88%b6","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2968","title":{"rendered":"Spring Cloud \u6559\u7a0b\u7b2c\u56db\u7ae0 Eureka \u7684\u539f\u7406\u4e0e\u5b9e\u73b0\u673a\u5236"},"content":{"rendered":"<p>\n\t\u524d\u9762\u7684 3 \u7ae0\u6211\u4eec\u90fd\u5728\u8bf4 Eureka \u662f\u5982\u4f55\u4f7f\u7528\u7684\uff0c\u4f46\u662f\u5728\u9762\u8bd5\u4e2d\u5f88\u5c11\u6709\u4eba\u4f1a\u95ee\u5230\u4f60\u5177\u4f53\u7684\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528\uff0c\u800c\u662f\u6df1\u5165\u539f\u7406\u95ee\u4f60 Eureka \u662f\u5982\u4f55\u5b9e\u73b0\u7684\uff1f\u90a3\u4e48\u672c\u6587\u5c31\u7ed3\u5408\u524d\u9762\u7684\u4e00\u4e9b\u7ae0\u8282\uff0c\u6765\u4e00\u8d77\u8ba8\u8bba\u8ba8\u8bba Eureka \u7684\u5b9e\u73b0\u539f\u7406\u4e0e\u673a\u5236\u3002\n<\/p>\n<p>\n\t\u5148\u6765\u5f20\u56fe\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u96c6\u7fa4\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka02.png\" style=\"width: 629px;height: 323px\" \/>\n<\/p>\n<p>\n\t\u4e0a\u9762\u8fd9\u5f20\u56fe\uff0c\u53ef\u80fd\u5927\u5bb6\u90fd\u770b\u8fc7\u3002\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d\uff0cEureka \u662f\u4ee5\u96c6\u7fa4\u7684\u65b9\u5f0f\u5b58\u5728\u7684\u3002\u7136\u540e Service Provider\uff1a\u670d\u52a1\u63d0\u4f9b\u65b9\uff0c\u5c06\u81ea\u8eab\u670d\u52a1\u6ce8\u518c\u5230 Eureka\uff0c\u4ece\u800c\u4f7f\u670d\u52a1\u6d88\u8d39\u65b9\u80fd\u591f\u627e\u5230\u3002Service Consumer\uff1a\u670d\u52a1\u6d88\u8d39\u65b9\uff0c\u4ece Eureka \u83b7\u53d6\u6ce8\u518c\u670d\u52a1\u5217\u8868\uff0c\u4ece\u800c\u80fd\u591f\u6d88\u8d39\u670d\u52a1\u3002Eureka Server\uff1a\u63d0\u4f9b\u670d\u52a1\u6ce8\u518c\u548c\u53d1\u73b0\u3002\u6d88\u8d39\u65b9\u4f1a\u7f13\u5b58\u4e00\u4e9b\u670d\u52a1\u63d0\u4f9b\u65b9\uff0c\u6d88\u8d39\u65b9\u83b7\u5f97\u670d\u52a1\u5217\u8868\u540e\uff0c\u76f4\u63a5\u8c03\u7528\u670d\u52a1\u63d0\u4f9b\u65b9\uff0c\u800c\u4e0d\u662f\u901a\u8fc7 Eureka Server \u53bb\u8c03\u7528\u3002\u670d\u52a1\u63d0\u4f9b\u65b9\u548c Eureka Server \u4f1a\u5b9e\u65f6\u901a\u8fc7\u5fc3\u8df3\u6765\u4fdd\u6d3b\uff0c\u4fdd\u8bc1\u6bcf\u4e2a\u670d\u52a1\u7684\u53ef\u7528\u6027\u3002\n<\/p>\n<p>\n\t\u6ce8\u610f\uff0c\u4e0a\u9762\u53ea\u662f\u4e00\u4e2a\u903b\u8f91\u56fe\u3002\u5b9e\u9645\u7684\u4f7f\u7528\u4e2d\uff0c\u4e00\u4e2a\u670d\u52a1\u53ef\u80fd\u5373\u662f\u6d88\u8d39\u65b9\u53c8\u662f\u63d0\u4f9b\u65b9\uff0c\u540c\u65f6\u53ef\u80fd\u8fd8\u5177\u5907\u670d\u52a1\u7684\u53d1\u73b0\u529f\u80fd\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u518d\u6765\u770b\u7b2c\u4e8c\u5f20\u56fe\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u7684\u670d\u52a1\u53d1\u73b0\u3001\u6ce8\u518c\u3001\u7eed\u7ea6\u3001\u4e0b\u7ebf\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka03.png\" style=\"width: 606px;height: 299px\" \/>\n<\/p>\n<p>\n\t\u4e0a\u9762\u7684\u8fd9\u5f20\u56fe\u663e\u793a\uff0cEureka \u96c6\u7fa4\u4e4b\u95f4\u4f1a\u8fdb\u884c\u6570\u636e\u540c\u6b65\u3002\u670d\u52a1\u63d0\u4f9b\u65b9\u4f1a\u8fdb\u884cRegister\uff08\u670d\u52a1\u6ce8\u518c\uff09\u3001Renew\uff08\u670d\u52a1\u7eed\u7ea6\uff09\u3001Cancel\uff08\u670d\u52a1\u4e0b\u7ebf\uff09\u7b49\u64cd\u4f5c\u3002Service Consumer \u4f1a\u5411 Eureka Server \u83b7\u53d6\u6ce8\u518c\u670d\u52a1\u5217\u8868\uff0c\u5e76\u901a\u8fc7 HTTP Rest \u8fdc\u7a0b\u8c03\u7528\u7684\u65b9\u5f0f\u6d88\u8d39\u670d\u52a1\u3002\n<\/p>\n<p>\n\t\u770b\u61c2\u8fd9\u51e0\u5f20\u56fe\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u6df1\u5165\u5230 Eureka \u6e90\u7801\u4e2d\u53bb\u3002Eureka \u5176\u5b9e\u5c31\u662f\u4e00\u4e2a\u7b80\u5355\u7684&nbsp;Servlet \u5e94\u7528\uff0c\u5b83\u4f7f\u7528 Jersey \u6846\u67b6\u5b9e\u73b0\u81ea\u8eab\u7684 RESTful HTTP\u63a5\u53e3\uff0cpeer\u4e4b\u95f4\u7684\u540c\u6b65\u4e0e\u670d\u52a1\u7684\u6ce8\u518c\u5168\u90e8\u901a\u8fc7 HTTP \u534f\u8bae\u5b9e\u73b0\uff0c\u5b9a\u65f6\u4efb\u52a1(\u53d1\u9001\u5fc3\u8df3\u3001\u5b9a\u65f6\u6e05\u7406\u8fc7\u671f\u670d\u52a1\u3001\u8282\u70b9\u540c\u6b65\u7b49)\u901a\u8fc7 JDK \u81ea\u5e26\u7684 Timer \u5b9e\u73b0\uff0c\u5185\u5b58\u7f13\u5b58\u4f7f\u7528 Google \u7684 guava \u5305\u5b9e\u73b0\u3002\n<\/p>\n<p>\n\t\u5927\u5bb6\u53ef\u4ee5\u81ea\u5df1\u5230 github \u4e0a\u4e0b\u8f7d Eureka \u6e90\u7801\uff0c\u81ea\u5df1\u7f16\u8bd1\u6d4b\u8bd5\u6d4b\u8bd5\u3002\u770b\u6211\u4e0b\u8f7d\u7684\u5176\u4e2d\u4e00\u4e2a\u7248\u672c\u7684\u6838\u5fc3\u4ee3\u7801\u7ed3\u6784\u5982\u4e0b\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u6e90\u7801\u7ed3\u6784\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka04.png\" style=\"width: 218px;height: 169px\" \/>\n<\/p>\n<p>\n\teureka-core \u6a21\u5757\u5305\u542b\u4e86\u529f\u80fd\u7684\u6838\u5fc3\u5b9e\u73b0\uff1a\n<\/p>\n<ul>\n<li>\n\t\tcom.netflix.eureka.cluster &#8211; \u4e0epeer\u8282\u70b9\u590d\u5236(replication)\u76f8\u5173\u7684\u529f\u80fd&nbsp;\n\t<\/li>\n<li>\n\t\tcom.netflix.eureka.lease &#8211; \u5373&rdquo;\u79df\u7ea6&rdquo;, \u7528\u6765\u63a7\u5236\u6ce8\u518c\u4fe1\u606f\u7684\u751f\u547d\u5468\u671f(\u6dfb\u52a0\u3001\u6e05\u9664\u3001\u7eed\u7ea6)&nbsp;\n\t<\/li>\n<li>\n\t\tcom.netflix.eureka.registry &#8211; \u5b58\u50a8\u3001\u67e5\u8be2\u670d\u52a1\u6ce8\u518c\u4fe1\u606f&nbsp;\n\t<\/li>\n<li>\n\t\tcom.netflix.eureka.resources &#8211; RESTful\u98ce\u683c\u4e2d\u7684&rdquo;R&rdquo;, \u5373\u8d44\u6e90\u3002\u76f8\u5f53\u4e8eSpringMVC\u4e2d\u7684Controller&nbsp;\n\t<\/li>\n<li>\n\t\tcom.netflix.eureka.transport &#8211; \u53d1\u9001HTTP\u8bf7\u6c42\u7684\u5ba2\u6237\u7aef\uff0c\u5982\u53d1\u9001\u5fc3\u8df3&nbsp;\n\t<\/li>\n<li>\n\t\tcom.netflix.eureka.aws &#8211; \u4e0eamazon AWS\u670d\u52a1\u76f8\u5173\u7684\u7c7b\n\t<\/li>\n<\/ul>\n<p>\n\t\u901a\u8fc7 Octotree \u67e5\u770b github \u4e0a\u7684\u6e90\u7801\u7ed3\u6784\uff0cEureka \u7684\u6e90\u4ee3\u7801\u5e76\u6ca1\u6709\u591a\u5c11\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u6e90\u7801\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka05.png\" style=\"width: 425px;height: 472px\" \/>\n<\/p>\n<p>\n\t\u7531\u4e8e\u662f Servlet \u5e94\u7528\uff0c\u6240\u4ee5 Eureka \u9700\u8981\u901a\u8fc7 Servlet \u7684\u76f8\u5173\u76d1\u542c\u5668 ServletContextListener \u5d4c\u5165\u5230 Servlet \u7684\u751f\u547d\u5468\u671f\u4e2d\u3002EurekaServerBootStrap \u7c7b\u5b9e\u73b0\u4e86\u8be5\u63a5\u53e3\uff0c\u5728 servlet \u6807\u51c6\u7684 contextInitialized() \u65b9\u6cd5\u4e2d\u5b8c\u6210\u4e86\u521d\u59cb\u5316\u5de5\u4f5c\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\n@Override\r\npublic void contextInitialized(ServletContextEvent event) {\r\n    try {\r\n        \/\/ \u8bfb\u53d6\u914d\u7f6e\u4fe1\u606f\r\n        initEurekaEnvironment(); \r\n        \/\/ \u521d\u59cb\u5316Eureka Client(\u7528\u6765\u4e0e\u5176\u5b83\u8282\u70b9\u8fdb\u884c\u540c\u6b65)\r\n        \/\/ \u521d\u59cb\u5316server\r\n        initEurekaServerContext(); \r\n\r\n        ServletContext sc = event.getServletContext();\r\n        sc.setAttribute(EurekaServerContext.class.getName(), serverContext);\r\n    } catch (Throwable e) {\r\n        logger.error(&quot;Cannot bootstrap eureka server :&quot;, e);\r\n        throw new RuntimeException(&quot;Cannot bootstrap eureka server :&quot;, e);\r\n    }\r\n}<\/pre>\n<p>\n\t\u7531\u4e8e\u8bb2\u89e3\u6e90\u7801\u9700\u8981\u82b1\u8d39\u5927\u91cf\u7684\u7bc7\u5e45\uff0c\u6211\u5c31\u4e0d\u5728\u7ec6\u8bb2\u3002\u540e\u9762\u6574\u4e2a Spring Cloud \u6559\u7a0b\u505a\u5b8c\u4e4b\u540e\uff0c\u5982\u679c\u6709\u65f6\u95f4\u6211\u5728\u5355\u72ec\u6765\u8bb2\u3002\u8fd9\u91cc\u5927\u5bb6\u627e\u5230\u5165\u53e3\u540e\uff0c\u5148\u5c1d\u8bd5\u7740\u81ea\u5df1\u53bb\u5206\u6790\u5427\u3002\n<\/p>\n<h2>\n\tRegister\uff08\u670d\u52a1\u6ce8\u518c\uff09<br \/>\n<\/h2>\n<p>\n\t\u670d\u52a1\u6ce8\u518c\u4e00\u822c\u662f\u53d1\u751f\u5728\u670d\u52a1\u542f\u52a8\u7684\u65f6\u5019\uff0c\u540e\u9762\u5982\u679c\u670d\u52a1\u81ea\u8eab\u68c0\u6d4b\u8ba4\u4e3a Down\uff0c\u4e5f\u4f1a\u6765\u66f4\u65b0\u670d\u52a1\u72b6\u6001\u7684\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u670d\u52a1\u6ce8\u518c\u6d41\u7a0b\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka06.png\" style=\"width: 798px;height: 429px\" \/>\n<\/p>\n<p>\n\t\u6ce8\u518c\u7684\u670d\u52a1\u5217\u8868\u4fdd\u5b58\u5728\u4e00\u4e2a\u5d4c\u5957\u7684 hash map\u4e2d\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\nprivate final ConcurrentHashMap&lt;String, Map&lt;String, Lease&lt;InstanceInfo&gt;&gt;&gt; registry =\r\nnew ConcurrentHashMap&lt;String, Map&lt;String, Lease&lt;InstanceInfo&gt;&gt;&gt;();<\/pre>\n<ul>\n<li>\n\t\t\u7b2c\u4e00\u5c42hash map\u7684key\u662fapp name\uff0c\u4e5f\u5c31\u662f\u5e94\u7528\u540d\u5b57\n\t<\/li>\n<li>\n\t\t\u7b2c\u4e8c\u5c42hash map\u7684key\u662finstance name\uff0c\u4e5f\u5c31\u662f\u5b9e\u4f8b\u540d\u5b57\n\t<\/li>\n<\/ul>\n<p>\n\tApplicationResource \u7c7b\u63a5\u6536 Http \u670d\u52a1\u8bf7\u6c42\uff0c\u8c03\u7528 PeerAwareInstanceRegistryImpl \u7684 register \u65b9\u6cd5\u3002<br \/>\n\tPeerAwareInstanceRegistryImpl \u5b8c\u6210\u670d\u52a1\u6ce8\u518c\u540e\uff0c\u8c03\u7528 replicateToPeers \u5411\u5176\u5b83 Eureka Server \u8282\u70b9\uff08Peer\uff09\u505a\u72b6\u6001\u540c\u6b65\uff08\u5f02\u6b65\u64cd\u4f5c\uff09\u3002\n<\/p>\n<h2>\n\tRenew\uff08\u670d\u52a1\u7eed\u7ea6\uff09<br \/>\n<\/h2>\n<p>\n\tRenew\uff08\u670d\u52a1\u7eed\u7ea6\uff09\u64cd\u4f5c\u7531 Service Provider \u5b9a\u671f\u8c03\u7528\uff0c\u7c7b\u4f3c\u4e8e heartbeat\u3002\u4e3b\u8981\u662f\u7528\u6765\u544a\u8bc9 Eureka Server Service Provider \u8fd8\u6d3b\u7740\uff0c\u907f\u514d\u670d\u52a1\u88ab\u5254\u9664\u6389\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u670d\u52a1\u7eed\u7ea6\u6d41\u7a0b\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka07.png\" style=\"width: 804px;height: 334px\" \/>\n<\/p>\n<p>\n\t\u670d\u52a1\u7eed\u7ea6\u7684\u8fc7\u7a0b\u4e0e\u670d\u52a1\u6ce8\u518c\u7684\u8fc7\u7a0b\u57fa\u672c\u4e00\u81f4\uff1a\u9996\u5148\u66f4\u65b0\u81ea\u8eab\u72b6\u6001\uff0c\u518d\u540c\u6b65\u5230\u5176\u5b83Peer\u3002\n<\/p>\n<h2>\n\tCancel\uff08\u670d\u52a1\u4e0b\u7ebf\uff09<br \/>\n<\/h2>\n<p>\n\tCancel\uff08\u670d\u52a1\u4e0b\u7ebf\uff09\u4e00\u822c\u5728 Service Provider shut down \u7684\u65f6\u5019\u8c03\u7528\uff0c\u7528\u6765\u628a\u81ea\u8eab\u7684\u670d\u52a1\u4ece Eureka Server \u4e2d\u5220\u9664\uff0c\u4ee5\u9632\u5ba2\u6237\u7aef\u8c03\u7528\u4e0d\u5b58\u5728\u7684\u670d\u52a1\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Eureka \u670d\u52a1\u4e0b\u7ebf\u6d41\u7a0b\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/eureka08.png\" style=\"width: 807px;height: 443px\" \/>\n<\/p>\n<p>\n\t\u540c\u6837\u7684\u5148\u4ece\u4e3b\u8282\u70b9\u4e0b\u7ebf\uff0c\u7136\u540e\u5411\u5176\u5b83\u8282\u70b9\u5f02\u6b65\u64cd\u4f5c\u505a\u72b6\u6001\u540c\u6b65\u3002\n<\/p>\n<p>\n\t\u8bf4\u5b8c\u8fd9\u4e09\u4e2a\u4e3b\u8981\u7684\u6d41\u7a0b\u540e\uff0c\u76f8\u4fe1\u5927\u5bb6\u5bf9 Eureka \u6709\u4e86\u66f4\u6df1\u7684\u8ba4\u8bc6\u3002\u5176\u5b9e Eureka \u8fd8\u6709\u5f88\u591a\u5176\u5b83\u7684\u77e5\u8bc6\u70b9\uff0c\u6211\u4eec\u6ca1\u8bb2\u5230\u3002\u5982\u67d0\u4e00\u4e2a\u8282\u70b9\u6545\u969c\u5c06\u53d1\u751f\u54ea\u4e9b\u64cd\u4f5c\uff1f\u518d\u6bd4\u5982\u6d88\u8d39\u65b9\u7684\u7f13\u5b58\u66f4\u65b0\u7b56\u7565\u7b49\u3002\u8fd9\u4e9b\u9650\u4e8e\u65f6\u95f4\u5173\u7cfb\uff0c\u6211\u4eec\u5728\u6574\u4e2a Spring Cloud \u6848\u4f8b\u5199\u5b8c\u4e86\u540e\uff0c\u518d\u56de\u8fc7\u5934\u6765\u6574\u7406\u3002\n<\/p>\n<h2>\n\t\u53c2\u8003\u8d44\u6599<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/blog.csdn.net\/neosmith\/article\/details\/53131023\" name=\"Spring Cloud Netflix Eureka\u6e90\u7801\u5bfc\u8bfb\u4e0e\u539f\u7406\u5206\u6790\" target=\"_blank\" title=\"Spring Cloud Netflix Eureka\u6e90\u7801\u5bfc\u8bfb\u4e0e\u539f\u7406\u5206\u6790\">Spring Cloud Netflix Eureka\u6e90\u7801\u5bfc\u8bfb\u4e0e\u539f\u7406\u5206\u6790<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/blog.csdn.net\/qiansg123\/article\/details\/80127590\" name=\"\u6df1\u5ea6\u5256\u6790\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6Netflix Eureka\" target=\"_blank\" title=\"\u6df1\u5ea6\u5256\u6790\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6Netflix Eureka\">\u6df1\u5ea6\u5256\u6790\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6Netflix Eureka<\/a>\n\t<\/li>\n<\/ul>\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=2968\">Spring Cloud \u6559\u7a0b\u7b2c\u56db\u7ae0 Eureka \u7684\u539f\u7406\u4e0e\u5b9e\u73b0\u673a\u5236<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u524d\u9762\u7684 3 \u7ae0\u6211\u4eec\u90fd\u5728\u8bf4 Eureka \u662f\u5982\u4f55\u4f7f\u7528\u7684\uff0c\u4f46\u662f\u5728\u9762\u8bd5\u4e2d\u5f88\u5c11\u6709\u4eba\u4f1a\u95ee\u5230\u4f60\u5177\u4f53\u7684\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528\uff0c\u800c\u662f\u6df1 [&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,587,588,216,581],"class_list":["post-2968","post","type-post","status-publish","format-standard","hentry","category-java","tag-eureka","tag-spring-boot","tag-spring-cloud","tag-216","tag-581"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2968","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=2968"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2968\/revisions"}],"predecessor-version":[{"id":2969,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2968\/revisions\/2969"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}