{"id":10006341,"date":"2022-08-29T17:11:04","date_gmt":"2022-08-29T09:11:04","guid":{"rendered":"https:\/\/ityet.com\/?p=10006341"},"modified":"2022-08-29T17:11:04","modified_gmt":"2022-08-29T09:11:04","slug":"%e5%bf%ab%e9%80%9f%e6%90%ad%e5%bb%ba-springcloud-alibaba-nacos-%e9%85%8d%e7%bd%ae%e4%b8%ad%e5%bf%83%ef%bc%81","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006341","title":{"rendered":"\u5feb\u901f\u642d\u5efa SpringCloud Alibaba Nacos \u914d\u7f6e\u4e2d\u5fc3\uff01"},"content":{"rendered":"<p>Spring Cloud Alibaba \u662f\u963f\u91cc\u5df4\u5df4\u63d0\u4f9b\u7684\u4e00\u7ad9\u5f0f\u5fae\u670d\u52a1\u5f00\u53d1\u89e3\u51b3\u65b9\u6848\uff0c\u76ee\u524d\u5df2\u88ab Spring Cloud \u5b98\u65b9\u6536\u5f55\u3002\u800c Nacos \u4f5c\u4e3a Spring Cloud Alibaba \u7684\u6838\u5fc3\u7ec4\u4ef6\u4e4b\u4e00\uff0c\u63d0\u4f9b\u4e86\u4e24\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u529f\u80fd\uff1a\u670d\u52a1\u6ce8\u518c\u4e2d\u5fc3\uff08\u670d\u52a1\u6ce8\u518c\u548c\u53d1\u73b0\uff09\u529f\u80fd\uff0c\u548c\u7edf\u4e00\u914d\u7f6e\u4e2d\u5fc3\u529f\u80fd\u3002<\/p>\n<h2>Nacos \u7b80\u4ecb<\/h2>\n<p>Nacos \u81f4\u529b\u4e8e\u5e2e\u52a9\u5f00\u53d1\u8005\u53d1\u73b0\u3001\u914d\u7f6e\u548c\u7ba1\u7406\u5fae\u670d\u52a1\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u7ec4\u7b80\u5355\u6613\u7528\u7684\u7279\u6027\u96c6\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u5b9e\u73b0\u52a8\u6001\u670d\u52a1\u53d1\u73b0\u3001\u670d\u52a1\u914d\u7f6e\u3001\u670d\u52a1\u5143\u6570\u636e\u53ca\u6d41\u91cf\u7ba1\u7406\u3002<\/p>\n<h3>Nacos \u7279\u6027\u4ecb\u7ecd<\/h3>\n<p>Nacos \u5177\u6709\u4ee5\u4e0b\u7279\u6027\uff1a<\/p>\n<ul>\n<li>\u670d\u52a1\u53d1\u73b0\u548c\u670d\u52a1\u5065\u5eb7\u76d1\u6d4b\uff1a\u652f\u6301\u57fa\u4e8eDNS\u548c\u57fa\u4e8eRPC\u7684\u670d\u52a1\u53d1\u73b0\uff0c\u652f\u6301\u5bf9\u670d\u52a1\u7684\u5b9e\u65f6\u7684\u5065\u5eb7\u68c0\u67e5\uff0c\u963b\u6b62\u5411\u4e0d\u5065\u5eb7\u7684\u4e3b\u673a\u6216\u670d\u52a1\u5b9e\u4f8b\u53d1\u9001\u8bf7\u6c42\u3002<\/li>\n<li>\u52a8\u6001\u914d\u7f6e\u670d\u52a1\uff1a\u52a8\u6001\u914d\u7f6e\u670d\u52a1\u53ef\u4ee5\u8ba9\u60a8\u4ee5\u4e2d\u5fc3\u5316\u3001\u5916\u90e8\u5316\u548c\u52a8\u6001\u5316\u7684\u65b9\u5f0f\u7ba1\u7406\u6240\u6709\u73af\u5883\u7684\u5e94\u7528\u914d\u7f6e\u548c\u670d\u52a1\u914d\u7f6e\u3002<\/li>\n<li>\u52a8\u6001 DNS \u670d\u52a1\uff1a\u52a8\u6001 DNS \u670d\u52a1\u652f\u6301\u6743\u91cd\u8def\u7531\uff0c\u8ba9\u60a8\u66f4\u5bb9\u6613\u5730\u5b9e\u73b0\u4e2d\u95f4\u5c42\u8d1f\u8f7d\u5747\u8861\u3001\u66f4\u7075\u6d3b\u7684\u8def\u7531\u7b56\u7565\u3001\u6d41\u91cf\u63a7\u5236\u4ee5\u53ca\u6570\u636e\u4e2d\u5fc3\u5185\u7f51\u7684\u7b80\u5355 DNS \u89e3\u6790\u670d\u52a1\u3002<\/li>\n<li>\u670d\u52a1\u53ca\u5176\u5143\u6570\u636e\u7ba1\u7406\uff1a\u652f\u6301\u4ece\u5fae\u670d\u52a1\u5e73\u53f0\u5efa\u8bbe\u7684\u89c6\u89d2\u7ba1\u7406\u6570\u636e\u4e2d\u5fc3\u7684\u6240\u6709\u670d\u52a1\u53ca\u5143\u6570\u636e\u3002<\/li>\n<\/ul>\n<h2>\u914d\u7f6e\u4e2d\u5fc3\u529f\u80fd\u5b9e\u73b0<\/h2>\n<h3>1.\u6dfb\u52a0\u4f9d\u8d56<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Spring Boot \u9879\u76ee\uff0c\u6dfb\u52a0 nacos config \u548c web\uff08\u975e\u5fc5\u987b\uff09\u6846\u67b6\u4f9d\u8d56\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>  <img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391396\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><\/p>\n<blockquote><p>PS\uff1a\u6dfb\u52a0 web \u4f9d\u8d56\u4e3b\u8981\u4f5c\u7528\u662f\u4e3a\u4e86\u65b9\u4fbf\u540e\u9762\u4ee3\u7801\u6d4b\u8bd5\u3002<\/p><\/blockquote>\n<p>\u5982\u679c\u662f\u8001\u9879\u76ee\uff0c\u90a3\u4e48\u9700\u8981\u624b\u52a8\u6dfb\u52a0 nacos config \u7684\u4f9d\u8d56\uff0c\u4fee\u6539 pom.xml \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre><code class=\"xml\">&lt;dependency&gt;\n  &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n  &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n    &lt;groupId&gt;com.alibaba.cloud&lt;\/groupId&gt;\n    &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-config&lt;\/artifactId&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n<h3>2.\u914d\u7f6e Nacos Config \u4fe1\u606f<\/h3>\n<p>\u5728\u5e94\u7528\u7684 \/src\/main\/resources\/ \u76ee\u5f55\u4e0b\uff0c\u521b\u5efa\u5f15\u5bfc\u914d\u7f6e\u6587\u4ef6 bootstrap.yml\uff08\u6216 bootstrap.properties\uff09\uff0c\u6dfb\u52a0\u4ee5\u4e0b Nacos Config \u914d\u7f6e\u4fe1\u606f\uff1a<\/p>\n<pre><code class=\"yaml\">spring:\n  application:\n    name: nacosconfig # \u9879\u76ee\u540d\u79f0\u548c nacos DataId \u76f8\u5339\u914d\n  cloud:\n    nacos:\n      config:\n        server-addr: 127.0.0.1:8848 # nacos \u5730\u5740\u548c\u7aef\u53e3\n        file-extension: yaml # \u83b7\u53d6\u914d\u7f6e\u6587\u4ef6\u7684\u683c\u5f0f\uff1ayaml\n        username: nacos # nacos \u8ba4\u8bc1\u7528\u6237\u540d\n        password: nacos # nacos \u8ba4\u8bc1\u5bc6\u7801\nserver:\n  port: 9001 # \u9879\u76ee\u542f\u52a8\u7aef\u53e3<\/code><\/pre>\n<h3>3.\u7f16\u5199\u4ee3\u7801\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u63a7\u5236\u5668\uff0c\u4f7f\u7528 @Value \u6ce8\u89e3\u8bfb\u53d6\u914d\u7f6e\u4fe1\u606f\uff0c\u8bfb\u53d6\u65b9\u5f0f\u548c Spring Boot \u8bfb\u53d6\u672c\u5730\u914d\u7f6e\u4ee3\u7801\u4e00\u81f4\uff1a<\/p>\n<pre><code class=\"java\">import org.springframework.beans.factory.annotation.Value;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class TestController {\n    \/\/ \u4ece nacos \u4e2d\u8bfb\u53d6\u914d\u7f6e\u9879 config.info\n    @Value(&quot;${config.info}&quot;)\n    private String configInfo;\n\n    @GetMapping(&quot;\/getconfig&quot;)\n    public String getConfigInfo(){\n        return configInfo;\n    }\n}<\/code><\/pre>\n<h3>4.Nacos \u63a7\u5236\u53f0\u6dfb\u52a0\u914d\u7f6e\u4fe1\u606f<\/h3>\n<p>\u5728 Nacos \u63a7\u5236\u53f0\u521b\u5efa\u5e76\u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\uff0c\u6267\u884c\u6b65\u9aa4\u5982\u4e0b\u6240\u793a\u3002<br \/>\u9996\u5148\uff0c\u5728\u914d\u7f6e\u5217\u8868\u4e2d\u70b9\u51fb\u201c\u6dfb\u52a0\u201d\u6309\u94ae\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391397\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/>\u8fdb\u5165\u914d\u7f6e\u9875\u9762\uff0c\u65b0\u5efa YAML \u6216 Properties \u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391398\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/>\u4ee5\u4e0a\u5173\u952e\u53c2\u6570\u7684\u542b\u4e49\u548c\u89c4\u5219\u8bf4\u660e\u5982\u4e0b\u3002<\/p>\n<h4>\u2460 Data ID<\/h4>\n<p>Data ID \u7684\u62fc\u63a5\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>${prefix} &#8211; ${spring.profiles.active} . ${file-extension}<\/p><\/blockquote>\n<p>\u5176\u4e2d<\/p>\n<ul>\n<li>prefix \u9ed8\u8ba4\u4e3a spring.application.name \u7684\u503c\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u9879 spring.cloud.nacos.config.prefix \u6765\u914d\u7f6e\u3002<\/li>\n<li>spring.profiles.active \u5373\u4e3a\u5f53\u524d\u73af\u5883\u5bf9\u5e94\u7684 profile\uff0c<strong>\u5f53 active profile \u4e3a\u7a7a\u65f6\uff0c\u5bf9\u5e94\u7684\u8fde\u63a5\u7b26 &#8211; \u4e5f\u5c06\u4e0d\u5b58\u5728\uff0cdataId \u7684\u62fc\u63a5\u683c\u5f0f\u53d8\u6210 ${prefix}.${file-extension}<\/strong><\/li>\n<li>file-extension \u4e3a\u914d\u7f6e\u5185\u5bb9\u7684\u6570\u636e\u683c\u5f0f\uff0c\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u9879 spring.cloud.nacos.config.file-extension \u6765\u914d\u7f6e\u3002\u76ee\u524d\u53ea\u652f\u6301 properties \u7c7b\u578b\u3002<\/li>\n<\/ul>\n<h4>\u2461 Group<\/h4>\n<p>Group \u5206\u7ec4\u9009\u9879\uff0c\u4e3b\u8981\u662f\u7528\u6765\u9694\u79bb\u4e0d\u540c\u7684\u914d\u7f6e\u9879\u76ee\u7684\uff0c\u5b83\u7684\u9ed8\u8ba4\u503c\u4e3a DEFAULT_GROUP\uff0c\u53ef\u4ee5\u901a\u8fc7 spring.cloud.nacos.config.group \u914d\u7f6e\u3002<\/p>\n<p>\u914d\u7f6e\u597d\u76f8\u5e94\u7684\u5185\u5bb9\u4e4b\u540e\uff0c\u70b9\u51fb\u5e95\u90e8\u7684\u201c\u53d1\u5e03\u201d\u6309\u94ae\u5373\u53ef\uff0c\u6dfb\u52a0\u6210\u529f\u4e4b\u540e\u4f1a\u81ea\u52a8\u8fd4\u56de\u914d\u7f6e\u5217\u8868\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>  <img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391399\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/>\u542f\u52a8\u9879\u76ee\uff0c\u67e5\u770b\u6267\u884c\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391400\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><\/p>\n<h2>\u52a8\u6001\u5237\u65b0\u529f\u80fd<\/h2>\n<p><strong>\u52a8\u6001\u5237\u65b0\u529f\u80fd\u662f\u6307\uff1a\u5728 Nacos \u914d\u7f6e\u4e2d\u5fc3\u4fee\u6539\u7684\u914d\u7f6e\u5185\u5bb9\uff0c\u5728\u4e0d\u91cd\u542f\u9879\u76ee\u7684\u524d\u63d0\u4e0b\u53ef\u4ee5\u5b9e\u65f6\u7684\u8bfb\u53d6\u5230\u3002<\/strong><\/p>\n<p>Nacos \u9ed8\u8ba4\u4f1a\u4e3a\u6240\u6709\u83b7\u53d6\u6570\u636e\u6210\u529f\u7684 Nacos \u7684\u914d\u7f6e\u9879\u6dfb\u52a0\u4e86\u76d1\u542c\u529f\u80fd\uff0c\u5728\u76d1\u542c\u5230\u670d\u52a1\u7aef\u914d\u7f6e\u53d1\u751f\u53d8\u5316\u65f6\u4f1a\u5b9e\u65f6\u89e6\u53d1 org.springframework.cloud.context.refresh.ContextRefresher \u7684 refresh \u65b9\u6cd5\u3002<\/p>\n<p>\u4f46<strong>\u5982\u679c\u9700\u8981\u5bf9 Bean \u8fdb\u884c\u52a8\u6001\u5237\u65b0<\/strong>\uff0c\u9700\u8981\u53c2\u7167 Spring \u548c Spring Cloud \u89c4\u8303\uff0c<strong>\u63a8\u8350\u7ed9\u7c7b\u6dfb\u52a0 @RefreshScope \u6216 @ConfigurationProperties \u6ce8\u89e3<\/strong>\u3002<\/p>\n<p>\u4ee5\u4e0a\u9762\u7684\u6848\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u9700\u8981\u6dfb\u52a0\u52a8\u6001\u5237\u65b0\u529f\u80fd\uff0c\u53ea\u9700\u8981\u5728\u63a7\u5236\u5668\u4e0a\u6dfb\u52a0 @RefreshScope \u6ce8\u89e3\u5373\u53ef\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"java\">  import org.springframework.beans.factory.annotation.Value;\n  import org.springframework.cloud.context.config.annotation.RefreshScope;\n  import org.springframework.web.bind.annotation.GetMapping;\n  import org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@RefreshScope \/\/ \u5f00\u542f\u914d\u7f6e\u6587\u4ef6\u7684\u52a8\u6001\u5237\u65b0\npublic class TestController {\n    \/\/ \u4ece nacos \u4e2d\u8bfb\u53d6\u914d\u7f6e\u9879 config.info\n    @Value(&quot;${config.info}&quot;)\n    private String configInfo;\n\n    @GetMapping(&quot;\/getconfig&quot;)\n    public String getConfigInfo(){\n        return configInfo;\n    }\n\n}<\/code><\/pre>\n<p>\u6700\u7ec8\u7684\u5b9e\u73b0\u7ed3\u679c\u5982\u4e0b\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391401\" alt=\"\u52a8\u6001\u5237\u65b0.gif\" title=\"\u52a8\u6001\u5237\u65b0.gif\" loading=\"lazy\"><\/p>\n<h2>\u4eae\u70b9\u529f\u80fd\u4ecb\u7ecd<\/h2>\n<p>Nacos \u914d\u7f6e\u4e2d\u5fc3\u6709\u4e24\u4e2a\u5f88\u597d\u7528\u7684\u529f\u80fd\uff1a\u4e00\u4e2a\u662f\u4fee\u6539\u914d\u7f6e\u65f6\u7684\u5185\u5bb9\u5bf9\u6bd4\uff0c\u8ba9\u60a8\u4e00\u773c\u5c31\u53ef\u4ee5\u770b\u51fa\u6b64\u6b21\u4fee\u6539\u7684\u914d\u7f6e\u5185\u5bb9\uff0c\u9632\u6b62\u8bef\u64cd\u4f5c\uff1b\u7b2c\u4e8c\u4e2a\u662f\u5386\u53f2\u7248\u672c\u4e00\u952e\u56de\u6eda\u529f\u80fd\uff0c\u8ba9\u60a8\u80fd\u591f\u8f7b\u677e\u7684\u5b9e\u73b0\u6eaf\u6e90\u548c\u56de\u6eda\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h3>1.\u914d\u7f6e\u6587\u4ef6\u5bf9\u6bd4<\/h3>\n<p>\u5728\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u65f6\uff0c\u4f1a\u5148\u51fa\u73b0\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u5bf9\u6bd4\u9884\u89c8\u9875\u9762\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391402\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/>\u8fd9\u6837\u60a8\u5c31\u53ef\u4ee5\u6e05\u695a\u7684\u770b\u5230\u6b64\u6b21\u4fee\u6539\u548c\u6dfb\u52a0\u7684\u5177\u4f53\u914d\u7f6e\u4fe1\u606f\u4e86\uff0c\u4ece\u800c\u51cf\u5c11\u4e86\u8bef\u6539\u7684\u98ce\u9669\u3002<\/p>\n<h3>2.\u5386\u53f2\u7248\u672c\u4e00\u952e\u56de\u6eda<\/h3>\n<p>Nacos \u901a\u8fc7\u63d0\u4f9b\u914d\u7f6e\u7248\u672c\u7ba1\u7406\u53ca\u5176\u4e00\u952e\u56de\u6eda\u80fd\u529b\uff0c\u5e2e\u52a9\u7528\u6237\u6539\u9519\u914d\u7f6e\u7684\u65f6\u5019\u80fd\u591f\u5feb\u901f\u6062\u590d\uff0c\u964d\u4f4e\u5fae\u670d\u52a1\u7cfb\u7edf\u5728\u914d\u7f6e\u7ba1\u7406\u4e0a\u7684\u4e00\u5b9a\u4f1a\u9047\u5230\u7684\u53ef\u7528\u6027\u98ce\u9669\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391403\" alt=\"\" title=\"\" loading=\"lazy\"><br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042391404\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>\u9879\u76ee\u6e90\u7801<\/h2>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=oSvvdyXRocl2ysLqE88ILA%3D%3D.YmNuFJ8he7WxQTCKDE1QoHWWoq%2BX2rHHoyxaS8jj%2BQFcgLv%2B98zqq%2F6Thc6ZDmwsUAlJl0UsqP0iPl5aOzqrt7v22yYNRnBDkab0VGg2OPvrKovWaQQmiXTIAPzEM31W\" rel=\"nofollow\">https:\/\/gitee.com\/mydb\/spring-cloud-alibaba-example\/tree\/master\/spring-cloud-nacos-config<\/a><\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>Nacos \u4f5c\u4e3a Spring Cloud Alibaba \u7684\u6838\u5fc3\u7ec4\u4ef6\u4e4b\u4e00\uff0c\u63d0\u4f9b\u4e86\u4e24\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u529f\u80fd\uff1a\u6ce8\u518c\u4e2d\u5fc3\u548c\u914d\u7f6e\u4e2d\u5fc3\u529f\u80fd\u3002\u5176\u4e2d\u914d\u7f6e\u4e2d\u5fc3\u662f\u5c06\u914d\u7f6e\u6587\u4ef6\u4ece\u672c\u5730\u5316\uff0c\u53d8\u66f4\u4e3a\u4e91\u7aef\u5316\u7684\u8fc7\u7a0b\uff08Nacos \u670d\u52a1\u7aef\uff09\uff0c\u8fd9\u6837\u65e2\u80fd\u4fdd\u8bc1\u914d\u7f6e\u6587\u4ef6\u7684\u5b89\u5168\u6027\uff0c\u53c8\u80fd\u5b9e\u65f6\u7684\u4fee\u6539\u3001\u67e5\u770b\u3001\u56de\u6eda\u548c\u52a8\u6001\u5237\u65b0\u914d\u7f6e\u6587\u4ef6\u4e86\u3002<\/p>\n<h4>\u53c2\u8003\u6587\u6863<\/h4>\n<p>Nacos \u5b98\u65b9\u6587\u6863\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=PL%2B5HtUlbihS0oMYjTE36A%3D%3D.2dCEv3HJ442j06v96xl1BS0WUg5TLQyh1G%2B8TjGF5PhniFlZZfCnULnqNcIAGH%2Fp\" rel=\"nofollow\">https:\/\/nacos.io\/zh-cn\/docs\/w&#8230;<\/a><\/p>\n<blockquote>\n<p>\u662f\u975e\u5ba1\u4e4b\u4e8e\u5df1\uff0c\u6bc1\u8a89\u542c\u4e4b\u4e8e\u4eba\uff0c\u5f97\u5931\u5b89\u4e4b\u4e8e\u6570\u3002<\/p>\n<p>\u516c\u4f17\u53f7\uff1aJava\u4e2d\u6587\u793e\u7fa4<\/p>\n<p>Java\u9762\u8bd5\u5408\u96c6\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=rA2kpD%2FaimPvtZ2F%2BTdRGA%3D%3D.dkx%2FACB7amKgcB6SGiRm7pnfr%2FK%2BghK%2F5kD5OBBvMNmdHRGzEc%2FL5vaprMt43mHm\" rel=\"nofollow\">https:\/\/gitee.com\/mydb\/interview<\/a><\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042391394\">https:\/\/segmentfault.com\/a\/1190000042391394<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Cloud Alibaba \u662f\u963f\u91cc\u5df4\u5df4\u63d0\u4f9b\u7684\u4e00\u7ad9\u5f0f\u5fae\u670d\u52a1\u5f00\u53d1\u89e3\u51b3\u65b9\u6848\uff0c\u76ee\u524d\u5df2\u88ab Spring C [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006341","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006341"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006341\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}