{"id":15477,"date":"2025-04-18T21:58:05","date_gmt":"2025-04-18T13:58:05","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/15477.html"},"modified":"2025-04-18T21:58:05","modified_gmt":"2025-04-18T13:58:05","slug":"%e9%9b%86%e6%88%90-nacos%ef%bc%9a%e5%a6%82%e4%bd%95%e5%b0%86%e6%9c%8d%e5%8a%a1%e6%8f%90%e4%be%9b%e8%80%85%e6%b3%a8%e5%86%8c%e5%88%b0-nacos-%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/15477.html","title":{"rendered":"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f"},"content":{"rendered":"<p>\u4eca\u5929\u6211\u4eec\u6765\u52a8\u624b\u96c6\u6210\u4f18\u60e0\u5238\u5e73\u53f0\u9879\u76ee\u5230Nacos\u670d\u52a1\u5668\u3002\u8fd9\u4e2a\u9879\u76ee\u6211\u4eec\u5c06\u5206\u4e24\u8282\u8bfe\u6765\u8bb2&#xff0c;\u901a\u8fc7\u8fd9\u4e24\u8282\u8bfe\u7684\u5b66\u4e60&#xff0c;\u4f60\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u501f\u52a9Nacos&#xff0c;\u642d\u5efa\u8d77\u4e00\u4e2a\u7aef\u5230\u7aef\u7684\u5fae\u670d\u52a1\u8c03\u7528\u94fe\u8def\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d&#xff0c;\u4f60\u8fd8\u4f1a\u5b66\u5230Nacos\u81ea\u52a8\u88c5\u914d\u5668\u7684\u5de5\u4f5c\u539f\u7406&#xff0c;\u4ee5\u53caNacos\u6838\u5fc3\u53c2\u6570\u7684\u914d\u7f6e\u3002\u638c\u63e1\u4e86\u8fd9\u4e9b\u5185\u5bb9&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u5e73\u7a33\u9a7e\u9a6dNacos\u670d\u52a1\u6cbb\u7406\u4e86\u3002<\/p>\n<p>\u5728Nacos\u7684\u5730\u76d8\u4e0a&#xff0c;\u4e0b\u6e38\u670d\u52a1\u9700\u8981\u5148\u5c06\u81ea\u5df1\u4f5c\u4e3a\u201c\u670d\u52a1\u63d0\u4f9b\u8005\u201d\u6ce8\u518c\u5230Nacos&#xff0c;\u8fd9\u4e2a\u6d41\u7a0b\u53eb\u505a\u201c\u670d\u52a1\u6ce8\u518c\u201d&#xff1b;\u800c\u4e0a\u6e38\u670d\u52a1\u4f5c\u4e3a\u201c\u670d\u52a1\u6d88\u8d39\u8005\u201d&#xff0c;\u9700\u8981\u5230Nacos\u4e2d\u83b7\u53d6\u53ef\u4f9b\u8c03\u7528\u7684\u4e0b\u6e38\u670d\u52a1\u7684\u5217\u8868&#xff0c;\u8fd9\u4e2a\u6d41\u7a0b\u5c31\u662f\u201c\u670d\u52a1\u53d1\u73b0\u201d\u3002<\/p>\n<p>\u4eca\u5929\u6211\u5148\u4ece\u4e24\u4e2a\u4e0b\u6e38\u670d\u52a1coupon-template-serv\u548ccoupon-calculation-serv\u5f00\u59cb&#xff0c;\u5229\u7528Nacos\u7684\u670d\u52a1\u6ce8\u518c\u529f\u80fd&#xff0c;\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230Nacos\u670d\u52a1\u5668\u3002\u5728\u4e0b\u4e00\u8282\u8bfe\u4e2d&#xff0c;\u6211\u518d\u5411\u4f60\u5c55\u793a\u4f5c\u4e3a\u670d\u52a1\u6d88\u8d39\u8005\u7684coupon-customer-serv\u662f\u5982\u4f55\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u5411\u670d\u52a1\u63d0\u4f9b\u8005\u53d1\u8d77\u8c03\u7528\u3002<\/p>\n<p>\u5728\u96c6\u6210Nacos\u4e4b\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u5148\u628aNacos\u7684\u4f9d\u8d56\u9879\u5f15\u5165\u5230\u9879\u76ee\u4e2d\u3002<\/p>\n<h3>\u6dfb\u52a0Nacos\u4f9d\u8d56\u9879<\/h3>\n<p>Nacos\u662fSping Cloud Alibaba\u9879\u76ee\u7684\u4e00\u6b3e\u7ec4\u4ef6&#xff0c;\u5728\u5f15\u5165Nacos\u7684\u4f9d\u8d56\u9879\u4e4b\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u5728\u9879\u76ee\u7684\u9876\u5c42pom\u4e2d\u5b9a\u4e49\u6240\u8981\u4f7f\u7528\u7684Spring Cloud\u548cSpring Cloud Alibaba\u7684\u7248\u672c\u3002<\/p>\n<p>Spring Boot\u3001Spring Cloud\u548cSpring Cloud Alibaba\u4e09\u8005\u4e4b\u95f4\u6709\u4e25\u683c\u7684\u7248\u672c\u5339\u914d\u5173\u7cfb&#xff0c;\u8fd9\u4e09\u4e2a\u7ec4\u4ef6\u7684\u53e3\u5473\u975e\u5e38\u5201\u94bb&#xff0c;\u53ea\u80fd\u548c\u7279\u5b9a\u7248\u672c\u533a\u95f4\u7684\u642d\u6863\u76f8\u4e92\u5408\u4f5c&#xff0c;\u4e00\u65e6\u7528\u9519\u4e86\u7248\u672c&#xff0c;\u5c31\u4f1a\u4ea7\u751f\u5404\u79cd\u83ab\u540d\u5176\u5999\u7684\u517c\u5bb9\u6027\u95ee\u9898\u3002\u90a3\u4e48\u6211\u4eec\u5728\u54ea\u91cc\u53ef\u4ee5\u67e5\u8be2\u5230\u6b63\u786e\u7684\u7248\u672c\u5339\u914d\u5173\u7cfb\u5462&#xff1f;<\/p>\n<p>Spring Boot\u548cSpring Cloud\u7684\u7248\u672c\u5339\u914d\u5173\u7cfb\u53ef\u4ee5\u4eceSpring\u793e\u533a\u7f51\u7ad9\u83b7\u53d6&#xff0c;\u8bbf\u95ee\u8be5\u7f51\u5740\u540e\u4f60\u4f1a\u770b\u5230\u4e00\u4e32JSON\u6587\u4ef6&#xff0c;\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d&#xff0c;\u4f60\u53ef\u4ee5\u770b\u5230Spring \u5b98\u65b9\u7ed9\u51fa\u7684Spring Cloud\u6700\u65b0\u5206\u652f\u6240\u652f\u6301\u7684Spring Boot\u7248\u672c\u8303\u56f4\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135801-68025a69503d3.jpg\" alt=\"\" \/><\/p>\n<p>\u53e6\u5916&#xff0c;Spring Cloud Alibaba\u3001Spring Boot\u548cSpring Cloud\u7684\u5339\u914d\u5173\u7cfb\u53ef\u4ee5\u4eceSpring Cloud Alibaba\u7684\u5b98\u65b9GitHub wiki\u9875\u4e2d\u83b7\u53d6&#xff0c;\u6211\u5c06\u4e00\u4e9b\u5e38\u7528\u7684\u7248\u672c\u7ed8\u5236\u6210\u8868\u683c&#xff0c;\u4f60\u53ef\u4ee5\u4f5c\u4e3a\u53c2\u8003\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135801-68025a69d5726.jpg\" alt=\"\" \/><\/p>\n<p>\u6211\u63a8\u8350\u4f60\u4f7f\u7528\u4e0a\u56fe\u4e2d\u6307\u5b9a\u7684\u7248\u672c\u7ec4\u5408&#xff0c;\u8fd9\u91cc\u5217\u51fa\u7684\u7ec4\u5408\u90fd\u662f\u7ecf\u8fc7\u517c\u5bb9\u6027\u6d4b\u8bd5\u7684\u7a33\u5b9a\u7248\u672c&#xff0c;\u53ef\u4ee5\u7528\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u3002\u6211\u8fd9\u91cc\u9009\u62e9Spring Cloud 2020.0.1\u3001Spring Cloud Alibaba 2021.1\u548cSpring Boot 2.4.2\u4f5c\u4e3a\u5b9e\u6218\u9879\u76ee\u7684\u4f9d\u8d56\u7248\u672c\u3002<\/p>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u5c06Spring Cloud Alibaba\u548cSpring Cloud\u7684\u4f9d\u8d56\u9879\u7248\u672c\u6dfb\u52a0\u5230\u9876\u5c42\u9879\u76eegeekbang-coupon\u4e0b\u7684pom.xml\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>&lt;dependencyManagement&gt;<br \/>\n    &lt;dependencies&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-cloud-dependencies&lt;\/artifactId&gt;<br \/>\n            &lt;version&gt;2020.0.1&lt;\/version&gt;<br \/>\n            &lt;type&gt;pom&lt;\/type&gt;<br \/>\n            &lt;scope&gt;import&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt;<\/p>\n<p>        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;com.alibaba.cloud&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-cloud-alibaba-dependencies&lt;\/artifactId&gt;<br \/>\n            &lt;version&gt;2021.1&lt;\/version&gt;<br \/>\n            &lt;type&gt;pom&lt;\/type&gt;<br \/>\n            &lt;scope&gt;import&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n   &lt;\/dependencies&gt;<br \/>\n   &lt;!&#8211; \u7701\u7565\u90e8\u5206\u4ee3\u7801 &#8211;&gt;<br \/>\n&lt;\/dependencyManagement&gt;<\/p>\n<p>\u5b9a\u4e49\u4e86\u7ec4\u4ef6\u7684\u5927\u7248\u672c\u4e4b\u540e&#xff0c;\u6211\u4eec\u5c31\u53ef\u4ee5\u76f4\u63a5\u628aNacos\u7684\u4f9d\u8d56\u9879\u52a0\u5165\u5230coupon-template-serv\u548ccoupon-calculation-serv\u4e86\u3002\u6211\u5206\u522b\u5728\u8fd9\u4e24\u4e2a\u5b50\u6a21\u5757\u7684pom.xml\u6587\u4ef6\u4e2d\u52a0\u5165\u4e86Nacos\u7684\u4f9d\u8d56\u9879spring-cloud-starter-alibaba-nacos-discovery\u3002<\/p>\n<p>&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;com.alibaba.cloud&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;spring-cloud-starter-alibaba-nacos-discovery&lt;\/artifactId&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<p>\u7531\u4e8e\u6211\u5df2\u7ecf\u5c06Spring Cloud Alibaba\u7684\u4f9d\u8d56\u9879\u7248\u672c\u52a0\u5230\u4e86\u9876\u5c42\u9879\u76eegeekbang-coupon&#xff0c;\u56e0\u6b64&#xff0c;\u5728\u6dfb\u52a0Nacos\u4f9d\u8d56\u9879\u5230\u5b50\u6a21\u5757\u7684\u65f6\u5019\u4e0d\u9700\u8981\u7279\u522b\u6307\u5b9a &lt; version &gt; \u5185\u5bb9&#xff0c;\u5f53\u524d\u5b50\u6a21\u5757\u4f1a\u5c1d\u8bd5\u4ece\u7236\u7ea7\u9879\u76ee\u8bfb\u53d6\u6b63\u786e\u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<p>\u5728\u6dfb\u52a0\u5b8c\u4f9d\u8d56\u9879\u4e4b\u540e&#xff0c;\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u9879\u5f00\u542fNacos\u7684\u670d\u52a1\u6cbb\u7406\u529f\u80fd\u4e86\u3002Nacos\u901a\u8fc7\u81ea\u52a8\u88c5\u914d\u6d41\u7a0b&#xff08;auto configuration&#xff09;\u52a0\u8f7d\u914d\u7f6e\u9879\u5e76\u5f00\u542f\u670d\u52a1\u6ce8\u518c\u3002\u8fd9\u4e2a\u529f\u80fd\u53ef\u4e0d\u662fNacos\u6240\u72ec\u6709\u7684&#xff0c;Spring Cloud\u5404\u4e2a\u7ec4\u4ef6\u90fd\u91c7\u7528\u4e86\u81ea\u52a8\u88c5\u914d\u5668\u5b9e\u73b0\u4e86\u8f7b\u91cf\u7ea7\u7684\u7ec4\u4ef6\u96c6\u6210\u529f\u80fd&#xff0c;\u4f60\u53ea\u9700\u8981\u51e0\u884c\u914d\u7f6e&#xff0c;\u5269\u4e0b\u7684\u521d\u59cb\u5316\u5de5\u4f5c\u90fd\u53ef\u4ee5\u4ea4\u7ed9\u80cc\u540e\u7684\u81ea\u52a8\u88c5\u914d\u5668\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u4e0d\u8fc7&#xff0c;\u63a5\u4e0b\u6765\u6211\u8981\u5e26\u4f60\u4e86\u89e3\u4e00\u4e0bNacos\u81ea\u52a8\u88c5\u914d\u5668\u7684\u5e95\u5c42\u539f\u7406&#xff0c;\u56e0\u4e3a\u8fd9\u5c06\u6709\u52a9\u4e8e\u4f60\u7406\u89e3Spring Cloud\u7ec4\u4ef6\u7684\u542f\u52a8\u6d41\u7a0b&#xff0c;\u5982\u679c\u4f60\u5c06\u6765\u9700\u8981\u5f00\u53d1\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u7ec4\u4ef6&#xff0c;\u5c31\u53ef\u4ee5\u501f\u9274\u8fd9\u79cd\u8bbe\u8ba1\u6a21\u5f0f\u3002<\/p>\n<h3>Nacos\u81ea\u52a8\u88c5\u914d\u539f\u7406<\/h3>\n<p>\u5728Spring Cloud\u7a0d\u65e9\u4e00\u4e9b\u7684\u7248\u672c\u4e2d&#xff0c;\u6211\u4eec\u9700\u8981\u5728\u542f\u52a8\u7c7b\u4e0a\u6dfb\u52a0&#064;EnableDiscoveryClient\u6ce8\u89e3\u5f00\u542f\u670d\u52a1\u6cbb\u7406\u529f\u80fd&#xff0c;\u800c\u5728\u65b0\u7248\u672c\u7684Spring Cloud\u4e2d&#xff0c;\u8fd9\u4e2a\u6ce8\u89e3\u4e0d\u518d\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u6b65\u9aa4&#xff0c;\u6211\u4eec\u53ea\u9700\u8981\u901a\u8fc7\u914d\u7f6e\u9879\u5c31\u53ef\u4ee5\u5f00\u542fNacos\u7684\u529f\u80fd\u3002\u90a3\u4e48Nacos\u662f\u600e\u4e48\u5728\u542f\u52a8\u9636\u6bb5\u81ea\u52a8\u52a0\u8f7d\u914d\u7f6e\u9879\u5e76\u5f00\u542f\u76f8\u5173\u529f\u80fd\u7684\u5462&#xff1f;\u8fd9\u5c31\u8981\u4eceSpring Framework\u7684\u81ea\u52a8\u88c5\u914d\u6d41\u7a0b&#xff08;Auto Configuration&#xff09;\u8bf4\u8d77\u4e86\u3002<\/p>\n<p>\u6211\u4eec\u5c06Nacos\u4f9d\u8d56\u9879\u6dfb\u52a0\u5230\u9879\u76ee\u4e2d&#xff0c;\u540c\u65f6\u4e5f\u5f15\u5165\u4e86Nacos\u81ea\u5e26\u7684\u81ea\u52a8\u88c5\u914d\u5668&#xff0c;\u6bd4\u5982\u4e0b\u9762\u8fd9\u51e0\u4e2a\u88ab\u5f15\u5165\u7684\u81ea\u52a8\u88c5\u914d\u5668\u5c31\u638c\u7ba1\u4e86Nacos\u6838\u5fc3\u529f\u80fd\u7684\u521d\u59cb\u5316\u4efb\u52a1\u3002<\/p>\n<ul>\n<li>NacosDiscoveryAutoConfiguration&#xff1a;\u670d\u52a1\u53d1\u73b0\u529f\u80fd\u7684\u81ea\u52a8\u88c5\u914d\u5668&#xff0c;\u5b83\u4e3b\u8981\u505a\u4e24\u4ef6\u4e8b\u513f&#xff1a;\u52a0\u8f7dNacos\u914d\u7f6e\u9879&#xff0c;\u58f0\u660eNacosServiceDiscovery\u7c7b\u7528\u4f5c\u670d\u52a1\u53d1\u73b0&#xff1b;<\/li>\n<li>NacosServiceAutoConfiguration&#xff1a;\u58f0\u660e\u6838\u5fc3\u670d\u52a1\u6cbb\u7406\u7c7bNacosServiceManager&#xff0c;\u5b83\u53ef\u4ee5\u901a\u8fc7service id\u3001group\u7b49\u4e00\u7cfb\u5217\u53c2\u6570\u83b7\u53d6\u5df2\u6ce8\u518c\u7684\u670d\u52a1\u5217\u8868&#xff1b;<\/li>\n<li>NacosServiceRegistryAutoConfiguration&#xff1a;Nacos\u670d\u52a1\u6ce8\u518c\u7684\u81ea\u52a8\u88c5\u914d\u5668\u3002<\/li>\n<\/ul>\n<p>\u6211\u4eec\u4ee5NacosDiscoveryAutoConfiguration\u7c7b\u4e3a\u4f8b&#xff0c;\u4e86\u89e3\u4e00\u4e0b\u5b83\u662f\u600e\u4e48\u6837\u5de5\u4f5c\u7684&#xff0c;\u5148\u6765\u770b\u4e00\u4e0b\u5b83\u7684\u6e90\u7801\u3002<\/p>\n<p>&#064;Configuration(proxyBeanMethods &#061; false)<br \/>\n\/\/ \u5f53spring.cloud.discovery.enabled&#061;true\u65f6\u624d\u751f\u6548<br \/>\n&#064;ConditionalOnDiscoveryEnabled<br \/>\n\/\/ \u5f53spring.cloud.nacos.discovery.enabled&#061;true\u65f6\u751f\u6548<br \/>\n&#064;ConditionalOnNacosDiscoveryEnabled<br \/>\npublic class NacosDiscoveryAutoConfiguration {<\/p>\n<p>   \/\/ \u8bfb\u53d6Nacos\u6240\u6709\u914d\u7f6e\u9879\u5e76\u5c01\u88c5\u5230NacosDiscoveryProperties\u4e2d<br \/>\n   &#064;Bean<br \/>\n   &#064;ConditionalOnMissingBean<br \/>\n   public NacosDiscoveryProperties nacosProperties() {<br \/>\n      return new NacosDiscoveryProperties();<br \/>\n   }<\/p>\n<p>   \/\/ \u58f0\u660e\u670d\u52a1\u53d1\u73b0\u7684\u529f\u80fd\u7c7bNacosServiceDiscovery<br \/>\n   &#064;Bean<br \/>\n   &#064;ConditionalOnMissingBean<br \/>\n   public NacosServiceDiscovery nacosServiceDiscovery(<br \/>\n         NacosDiscoveryProperties discoveryProperties,<br \/>\n         NacosServiceManager nacosServiceManager) {<br \/>\n      return new NacosServiceDiscovery(discoveryProperties, nacosServiceManager);<br \/>\n   }<br \/>\n}<\/p>\n<p>NacosDiscoveryAutoConfiguration\u81ea\u52a8\u88c5\u914d\u5668\u6709\u4e24\u4e2a\u5f00\u542f\u6761\u4ef6&#xff0c;\u5206\u522b\u662fspring.cloud.discovery.enabled&#061;true\u548cspring.cloud.nacos.discovery.enabled&#061;true\u3002\u5f53\u6211\u4eec\u5f15\u5165Nacos\u7684\u4f9d\u8d56\u9879\u540e&#xff0c;\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u8fd9\u4e24\u4e2a\u5f00\u5173\u53c2\u6570\u7684\u503c\u5c31\u5df2\u7ecf\u662fTrue\u4e86\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u9664\u975e\u4f60\u4e3b\u52a8\u5173\u95edSpring Cloud\u548cNacos\u7684\u670d\u52a1\u53d1\u73b0\u5f00\u5173&#xff0c;\u5426\u5219\u8fd9\u4e2a\u81ea\u52a8\u88c5\u914d\u5668\u5c31\u4f1a\u81ea\u52a8\u6267\u884c\u52a0\u8f7d\u3002<\/p>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0bNacosDiscoveryAutoConfiguration\u4e2d\u58f0\u660e\u7684\u4e24\u4e2a\u65b9\u6cd5&#xff0c;\u4e5f\u5c31\u662fnacosProperties\u65b9\u6cd5\u548cnacosServiceDiscovery\u65b9\u6cd5\u90fd\u6709\u4ec0\u4e48\u529f\u80fd\u3002<\/p>\n<p>\u5728\u4e0a\u9762\u7684\u6e90\u7801\u4e2d&#xff0c;\u6211\u4eec\u770b\u5230&#xff0c;nacosProperties\u65b9\u6cd5\u8fd4\u56de\u4e86\u4e00\u4e2aNacosDiscoveryProperties\u7c7b&#xff0c;\u8fd9\u4e2a\u7c7b\u662f\u4e13\u95e8\u7528\u6765\u8bfb\u53d6\u548c\u5c01\u88c5Nacos\u914d\u7f6e\u9879\u7684\u7c7b&#xff0c;\u5b83\u7684\u6e90\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>\/\/ \u5b9a\u4e49\u4e86\u914d\u7f6e\u9879\u8bfb\u53d6\u7684\u8def\u5f84<br \/>\n&#064;ConfigurationProperties(&#034;spring.cloud.nacos.discovery&#034;)<br \/>\npublic class NacosDiscoveryProperties {<br \/>\n \/\/ \u7701\u7565\u7c7b\u5c5e\u6027<br \/>\n \/\/ \u8fd9\u91cc\u5b9a\u4e49\u7684\u7c7b\u5c5e\u6027\u548c\u63a5\u4e0b\u6765\u6211\u4eec\u8981\u4ecb\u7ecd\u7684\u914d\u7f6e\u9879\u662f\u4e00\u4e00\u5bf9\u5e94\u7684<br \/>\n}<\/p>\n<p>NacosDiscoveryProperties\u7c7b\u901a\u8fc7ConfigurationProperties\u6ce8\u89e3\u4ecespring.cloud.nacos.discovery\u8def\u5f84\u4e0b\u83b7\u53d6\u914d\u7f6e\u9879&#xff0c;Spring\u6846\u67b6\u4f1a\u81ea\u52a8\u5c06\u8fd9\u4e9b\u914d\u7f6e\u9879\u89e3\u6790\u5230NacosDiscoveryProperties\u7c7b\u5b9a\u4e49\u7684\u7c7b\u5c5e\u6027\u4e2d\u3002\u8fd9\u6837\u4e00\u6765Nacos\u5c31\u5b8c\u6210\u4e86\u914d\u7f6e\u9879\u7684\u52a0\u8f7d&#xff0c;\u5728\u5176\u5b83\u4e1a\u52a1\u6d41\u7a0b\u4e2d&#xff0c;\u53ea\u9700\u8981\u6ce8\u5165NacosDiscoveryProperties\u7c7b\u5c31\u53ef\u4ee5\u8bfb\u53d6Nacos\u7684\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n<p>NacosDiscoveryAutoConfiguration\u4e2d\u7684\u53e6\u4e00\u4e2a\u65b9\u6cd5nacosServiceDiscovery\u58f0\u660e\u4e86\u4e00\u4e2a\u670d\u52a1\u53d1\u73b0\u7684\u529f\u80fd\u7c7bNacosServiceDiscovery&#xff0c;\u5b83\u7684\u6838\u5fc3\u65b9\u6cd5\u7684\u6e90\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>public class NacosServiceDiscovery {<br \/>\n   \/\/ \u5c01\u88c5\u4e86Nacos\u914d\u7f6e\u9879\u7684\u7c7b<br \/>\n   private NacosDiscoveryProperties discoveryProperties;<br \/>\n   \/\/ \u53e6\u4e00\u4e2a\u81ea\u52a8\u88c5\u914d\u5668\u58f0\u660e\u7684\u6838\u5fc3\u670d\u52a1\u6cbb\u7406\u7c7b<br \/>\n   private NacosServiceManager nacosServiceManager;<\/p>\n<p>   \/\/ \u6839\u636e\u670d\u52a1\u540d\u79f0\u83b7\u53d6\u6240\u6709\u5df2\u6ce8\u518c\u670d\u52a1<br \/>\n   public List&lt;ServiceInstance&gt; getInstances(String serviceId) throws NacosException {<br \/>\n      String group &#061; discoveryProperties.getGroup();<br \/>\n      List&lt;Instance&gt; instances &#061; namingService().selectInstances(serviceId, group,<br \/>\n            true);<br \/>\n      return hostToServiceInstanceList(instances, serviceId);<br \/>\n   }<\/p>\n<p>   \/\/ \u8fd4\u56de\u6240\u6709\u670d\u52a1\u7684\u670d\u52a1\u540d\u79f0<br \/>\n   public List&lt;String&gt; getServices() throws NacosException {<br \/>\n      String group &#061; discoveryProperties.getGroup();<br \/>\n      ListView&lt;String&gt; services &#061; namingService().getServicesOfServer(1,<br \/>\n            Integer.MAX_VALUE, group);<br \/>\n      return services.getData();<br \/>\n   }<br \/>\n   \/\/ \u7701\u7565\u90e8\u5206\u4ee3\u7801&#8230;<br \/>\n}<\/p>\n<p>\u901a\u8fc7NacosServiceDiscovery\u66b4\u9732\u7684\u65b9\u6cd5&#xff0c;\u6211\u4eec\u5c31\u80fd\u591f\u6839\u636eserviceId&#xff08;\u6ce8\u518c\u5230nacos\u7684\u670d\u52a1\u540d\u79f0&#xff09;\u67e5\u8be2\u5230\u53ef\u7528\u7684\u670d\u52a1\u5b9e\u4f8b&#xff0c;\u83b7\u53d6\u5230\u670d\u52a1\u5b9e\u4f8b\u5217\u8868\u4e4b\u540e&#xff0c;\u8c03\u7528\u65b9\u5c31\u53ef\u4ee5\u53d1\u8d77\u8fdc\u7a0b\u670d\u52a1\u8c03\u7528\u4e86\u3002<\/p>\n<p>\u597d&#xff0c;\u5230\u8fd9\u91cc\u6211\u4eec\u5c31\u4e86\u89e3\u4e86NacosDiscoveryAutoConfiguration\u88c5\u914d\u5668\u505a\u4e86\u4ec0\u4e48\u4e8b\u513f&#xff0c;\u5e0c\u671b\u4f60\u53ef\u4ee5\u4e3e\u4e00\u53cd\u4e09&#xff0c;\u901a\u8fc7\u9605\u8bfbNacos\u6e90\u7801&#xff0c;\u6df1\u5165\u4e86\u89e3\u4e0b\u53e6\u5916\u4e24\u4e2a\u81ea\u52a8\u88c5\u914d\u5668NacosServiceAutoConfiguration\u548cNacosServiceRegistryAutoConfiguration\u7684\u5e95\u5c42\u4e1a\u52a1\u3002<\/p>\n<p>\u4e86\u89e3\u4e86Nacos\u5982\u4f55\u901a\u8fc7\u81ea\u52a8\u88c5\u914d\u5668\u52a0\u8f7d\u914d\u7f6e\u9879\u5e76\u5f00\u542f\u670d\u52a1\u6cbb\u7406\u529f\u80fd\u4e4b\u540e&#xff0c;\u6211\u4eec\u63a5\u4e0b\u6765\u53bb\u9879\u76ee\u4e2d\u6dfb\u52a0Nacos\u7684\u914d\u7f6e\u9879\u3002<\/p>\n<h3>\u6dfb\u52a0Nacos\u914d\u7f6e\u9879<\/h3>\n<p>Nacos\u7684\u914d\u7f6e\u9879\u5305\u542b\u4e86\u670d\u52a1\u6ce8\u518c\u53c2\u6570\u4e0e\u5404\u9879\u8fd0\u884c\u671f\u53c2\u6570&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6\u7684Spring Boot\u914d\u7f6e\u7ba1\u7406\u7684\u65b9\u5f0f\u8bbe\u7f6eNacos\u7684\u8fd0\u884c\u53c2\u6570\u3002<\/p>\n<p>\u4ee5\u6211\u4eec\u4eca\u5929\u8981\u6539\u9020\u7684\u670d\u52a1coupon-template-impl\u4e3a\u4f8b&#xff0c;\u6211\u4eec\u5148\u6765\u770b\u4e00\u4e0bapplication.yml\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e86\u54ea\u4e9bNacos\u6838\u5fc3\u914d\u7f6e\u3002Nacos\u76f8\u5173\u7684\u914d\u7f6e\u9879\u4f4d\u4e8espring.cloud.nacos\u8def\u5f84\u4e0b&#xff0c;\u6211\u914d\u7f6e\u7684Nacos\u5e38\u7528\u53c2\u6570\u5982\u4e0b&#xff1a;<\/p>\n<p>spring:<br \/>\n  cloud:<br \/>\n    nacos:<br \/>\n      discovery:<br \/>\n        # Nacos\u7684\u670d\u52a1\u6ce8\u518c\u5730\u5740&#xff0c;\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a&#xff0c;\u9017\u53f7\u5206\u9694<br \/>\n        server-addr: localhost:8848<br \/>\n        # \u670d\u52a1\u6ce8\u518c\u5230Nacos\u4e0a\u7684\u540d\u79f0&#xff0c;\u4e00\u822c\u4e0d\u7528\u914d\u7f6e<br \/>\n        service: coupon-customer-serv<br \/>\n        # nacos\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u7aef\u53d1\u9001\u5fc3\u8df3\u7684\u65f6\u95f4\u95f4\u9694&#xff0c;\u65f6\u95f4\u5355\u4f4d\u5176\u5b9e\u662fms<br \/>\n        heart-beat-interval: 5000<br \/>\n        # \u670d\u52a1\u7aef\u6ca1\u6709\u63a5\u53d7\u5230\u5ba2\u6237\u7aef\u5fc3\u8df3\u8bf7\u6c42\u5c31\u5c06\u5176\u8bbe\u4e3a\u4e0d\u5065\u5eb7\u7684\u65f6\u95f4\u95f4\u9694&#xff0c;\u9ed8\u8ba4\u4e3a15s<br \/>\n        # \u6ce8&#xff1a;\u63a8\u8350\u503c\u8be5\u503c\u4e3a15s\u5373\u53ef&#xff0c;\u5982\u679c\u6709\u7684\u4e1a\u52a1\u7ebf\u5e0c\u671b\u670d\u52a1\u4e0b\u7ebf\u6216\u8005\u51fa\u6545\u969c\u65f6\u5e0c\u671b\u5c3d\u5feb\u88ab\u53d1\u73b0&#xff0c;\u53ef\u4ee5\u9002\u5f53\u51cf\u5c11\u8be5\u503c<br \/>\n        heart-beat-timeout: 20000<br \/>\n        # \u5143\u6570\u636e\u90e8\u5206 &#8211; \u53ef\u4ee5\u81ea\u5df1\u968f\u4fbf\u5b9a\u5236<br \/>\n        metadata:<br \/>\n          mydata: abc<br \/>\n        # \u5ba2\u6237\u7aef\u5728\u542f\u52a8\u65f6\u662f\u5426\u8bfb\u53d6\u672c\u5730\u914d\u7f6e\u9879(\u4e00\u4e2a\u6587\u4ef6)\u6765\u83b7\u53d6\u670d\u52a1\u5217\u8868<br \/>\n        # \u6ce8&#xff1a;\u63a8\u8350\u8be5\u503c\u4e3afalse&#xff0c;\u82e5\u6539\u6210true\u3002\u5219\u5ba2\u6237\u7aef\u4f1a\u5728\u672c\u5730\u7684\u4e00\u4e2a<br \/>\n        # \u6587\u4ef6\u4e2d\u4fdd\u5b58\u670d\u52a1\u4fe1\u606f&#xff0c;\u5f53\u4e0b\u6b21\u5b95\u673a\u542f\u52a8\u65f6&#xff0c;\u4f1a\u4f18\u5148\u8bfb\u53d6\u672c\u5730\u7684\u914d\u7f6e\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u3002<br \/>\n        naming-load-cache-at-start: false<br \/>\n        # \u547d\u540d\u7a7a\u95f4ID&#xff0c;Nacos\u901a\u8fc7\u4e0d\u540c\u7684\u547d\u540d\u7a7a\u95f4\u6765\u533a\u5206\u4e0d\u540c\u7684\u73af\u5883&#xff0c;\u8fdb\u884c\u6570\u636e\u9694\u79bb&#xff0c;<br \/>\n        namespace: dev<br \/>\n        # \u521b\u5efa\u4e0d\u540c\u7684\u96c6\u7fa4<br \/>\n        cluster-name: Cluster-A<br \/>\n        # [\u6ce8\u610f]\u4e24\u4e2a\u670d\u52a1\u5982\u679c\u5b58\u5728\u4e0a\u4e0b\u6e38\u8c03\u7528\u5173\u7cfb&#xff0c;\u5fc5\u987b\u914d\u7f6e\u76f8\u540c\u7684group\u624d\u80fd\u53d1\u8d77\u8bbf\u95ee<br \/>\n        group: myGroup<br \/>\n        # \u5411\u6ce8\u518c\u4e2d\u5fc3\u6ce8\u518c\u670d\u52a1&#xff0c;\u9ed8\u8ba4\u4e3atrue<br \/>\n        # \u5982\u679c\u53ea\u6d88\u8d39\u670d\u52a1&#xff0c;\u4e0d\u4f5c\u4e3a\u670d\u52a1\u63d0\u4f9b\u65b9&#xff0c;\u5012\u662f\u53ef\u4ee5\u8bbe\u7f6e\u6210false&#xff0c;\u51cf\u5c11\u5f00\u9500<br \/>\n        register-enabled: true<\/p>\n<p>\u6211\u5e26\u4f60\u6df1\u5165\u4e86\u89e3\u4e0b\u4e0a\u9762\u7684\u6bcf\u4e2a\u53c2\u6570&#xff0c;\u4ee5\u53ca\u5b83\u4eec\u80cc\u540e\u7684\u4e00\u4e9b\u4f7f\u7528\u573a\u666f&#xff0c;\u638c\u63e1\u4e86\u8fd9\u4e9bNacos\u7684\u6838\u5fc3\u914d\u7f6e\u9879&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u5e73\u7a33\u9a7e\u9a6dNacos\u670d\u52a1\u6cbb\u7406\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135802-68025a6a85365.jpg\" alt=\"\" \/><\/p>\n<p>\u5728\u8fd9\u4e9b\u53c2\u6570\u4e2d&#xff0c;Namespace\u548cGroup\u7ecf\u5e38\u642d\u914d\u5728\u4e00\u5757\u6765\u4f7f\u7528&#xff0c;\u5b83\u4fe9\u5728\u529f\u80fd\u4e0a\u4e5f\u6709\u76f8\u4f3c\u4e4b\u5904&#xff0c;\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7ecf\u5e38\u50bb\u50bb\u5206\u4e0d\u6e05\u695a\u5b83\u4fe9\u7684\u7528\u9014\u3002\u4e3a\u4e86\u5e2e\u4f60\u66f4\u597d\u5730\u7406\u89e3\u8fd9\u4e24\u4e2a\u53c2\u6570&#xff0c;\u6211\u6765\u5e26\u4f60\u6df1\u5165\u4e86\u89e3\u4e0b\u8fd9\u4e24\u4e2a\u5c5e\u6027\u5404\u81ea\u7684\u4f7f\u7528\u573a\u666f\u3002<\/p>\n<p>Namespace\u53ef\u4ee5\u7528\u4f5c\u73af\u5883\u9694\u79bb\u6216\u8005\u591a\u79df\u6237\u9694\u79bb&#xff0c;\u5176\u4e2d&#xff1a;<\/p>\n<ul>\n<li>\u73af\u5883\u9694\u79bb&#xff1a;\u6bd4\u5982\u8bbe\u7f6e\u4e09\u4e2a\u547d\u540d\u7a7a\u95f4production\u3001pre-production\u548cdev&#xff0c;\u5206\u522b\u8868\u793a\u751f\u4ea7\u73af\u5883\u3001\u9884\u53d1\u73af\u5883\u548c\u5f00\u53d1\u73af\u5883&#xff0c;\u5982\u679c\u4e00\u4e2a\u5fae\u670d\u52a1\u6ce8\u518c\u5230\u4e86dev\u73af\u5883&#xff0c;\u90a3\u4e48\u4ed6\u65e0\u6cd5\u8c03\u7528\u5176\u4ed6\u73af\u5883\u7684\u670d\u52a1&#xff0c;\u56e0\u4e3a\u670d\u52a1\u53d1\u73b0\u673a\u5236\u53ea\u4f1a\u83b7\u53d6\u5230\u540c\u6837\u6ce8\u518c\u5230dev\u73af\u5883\u7684\u670d\u52a1\u5217\u8868\u3002\u5982\u679c\u672a\u6307\u5b9anamespace\u5219\u670d\u52a1\u4f1a\u88ab\u6ce8\u518c\u5230public\u8fd9\u4e2a\u9ed8\u8ba4namespace\u4e0b\u3002<\/li>\n<li>\u591a\u79df\u6237\u9694\u79bb&#xff1a;\u5373multi-tenant\u67b6\u6784&#xff0c;\u901a\u8fc7\u4e3a\u6bcf\u4e00\u4e2a\u7528\u6237\u63d0\u4f9b\u72ec\u7acb\u7684namespace\u4ee5\u5b9e\u73b0\u79df\u6237\u4e0e\u79df\u6237\u4e4b\u95f4\u7684\u73af\u5883\u9694\u79bb\u3002<\/li>\n<\/ul>\n<p>Group\u7684\u4f7f\u7528\u573a\u666f\u975e\u5e38\u7075\u6d3b&#xff0c;\u6211\u6765\u5217\u4e3e\u51e0\u4e2a&#xff1a;<\/p>\n<ul>\n<li>\u73af\u5883\u9694\u79bb&#xff1a;\u5728\u591a\u79df\u6237\u67b6\u6784\u4e4b\u4e0b&#xff0c;\u7531\u4e8enamespace\u5df2\u7ecf\u88ab\u7528\u4e8e\u79df\u6237\u9694\u79bb&#xff0c;\u4e3a\u4e86\u5b9e\u73b0\u540c\u4e00\u4e2a\u79df\u6237\u4e0b\u7684\u73af\u5883\u9694\u79bb&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528group\u4f5c\u4e3a\u73af\u5883\u9694\u79bb\u53d8\u91cf\u3002<\/li>\n<li>\u7ebf\u4e0a\u6d4b\u8bd5&#xff1a;\u5bf9\u4e8e\u6d89\u53ca\u5230\u4e0a\u4e0b\u6e38\u591a\u670d\u52a1\u8054\u52a8\u7684\u573a\u666f&#xff0c;\u6211\u5c06\u7ebf\u4e0a\u5df2\u90e8\u7f72\u7684\u5f85\u4e0a\u4e0b\u6e38\u6d4b\u670d\u52a1\u7684group\u8bbe\u7f6e\u4e3a\u201cgroup-A\u201d&#xff0c;\u7531\u4e8e\u8fd9\u662f\u4e00\u4e2a\u65b0\u7684\u72ec\u7acb\u5206\u7ec4&#xff0c;\u6240\u4ee5\u7ebf\u4e0a\u7684\u7528\u6237\u6d41\u91cf\u4e0d\u4f1a\u5bfc\u5411\u5230\u8fd9\u4e2agroup\u3002\u8fd9\u6837\u4e00\u6765&#xff0c;\u5f00\u53d1\u4eba\u5458\u5c31\u53ef\u4ee5\u5728\u4e0d\u5f71\u54cd\u7ebf\u4e0a\u4e1a\u52a1\u7684\u524d\u63d0\u4e0b&#xff0c;\u901a\u8fc7\u53d1\u9001\u6d4b\u8bd5\u8bf7\u6c42\u5230\u201cgroup-A\u201d\u7684\u673a\u5668\u5b8c\u6210\u7ebf\u4e0a\u6d4b\u8bd5\u3002<\/li>\n<li>\u5355\u5143\u5c01\u95ed&#xff1a;\u4ec0\u4e48\u662f\u5355\u5143\u5c01\u95ed\u5462&#xff1f;\u4e3a\u4e86\u4fdd\u8bc1\u4e1a\u52a1\u7684\u9ad8\u53ef\u7528\u6027&#xff0c;\u901a\u5e38\u6211\u4eec\u4f1a\u628a\u540c\u4e00\u4e2a\u670d\u52a1\u90e8\u7f72\u5728\u4e0d\u540c\u7684\u7269\u7406\u5355\u5143&#xff08;\u6bd4\u5982\u5f20\u5317\u673a\u623f\u3001\u676d\u5dde\u673a\u623f\u3001\u4e0a\u6d77\u673a\u623f&#xff09;&#xff0c;\u5f53\u67d0\u4e2a\u4e2d\u5fc3\u673a\u623f\u51fa\u73b0\u6545\u969c\u7684\u65f6\u5019&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5728\u5f88\u77ed\u7684\u65f6\u95f4\u5185\u628a\u7528\u6237\u6d41\u91cf\u5207\u5165\u5176\u4ed6\u5355\u5143\u673a\u623f\u3002\u7531\u4e8e\u540c\u4e00\u4e2a\u5355\u5143\u5185\u7684\u670d\u52a1\u5668\u8d44\u6e90\u901a\u5e38\u90e8\u7f72\u5728\u540c\u4e00\u4e2a\u7269\u7406\u673a\u623f&#xff0c;\u56e0\u6b64\u672c\u5355\u5143\u5185\u7684\u670d\u52a1\u8c03\u7528\u901f\u5ea6\u6700\u5feb&#xff0c;\u800c\u8de8\u5355\u5143\u7684\u670d\u52a1\u8c03\u7528\u5c06\u8981\u627f\u62c5\u5de8\u5927\u7684\u7f51\u7edc\u7b49\u5f85\u65f6\u95f4\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b&#xff0c;\u6211\u4eec\u53ef\u4ee5\u4e3a\u540c\u4e00\u4e2a\u5355\u5143\u7684\u670d\u52a1\u8bbe\u7f6e\u76f8\u540c\u7684group&#xff0c;\u4f7f\u5fae\u670d\u52a1\u8c03\u7528\u5c01\u95ed\u5728\u5f53\u524d\u5355\u5143\u5185&#xff0c;\u63d0\u9ad8\u4e1a\u52a1\u54cd\u5e94\u901f\u5ea6\u3002<\/li>\n<\/ul>\n<p>\u9664\u4e86\u8fd9\u51e0\u4e2a\u573a\u666f\u5916&#xff0c;\u4f60\u80fd\u4e3e\u4e00\u53cd\u4e09\u60f3\u4e00\u4e0b\u8fd8\u6709\u5176\u4ed6\u573a\u666f\u5417&#xff1f;\u5982\u679c\u4f60\u60f3\u66f4\u8fdb\u4e00\u6b65\u4e86\u89e3Nacos\u7684\u914d\u7f6e\u53c2\u6570\u5168\u96c6&#xff0c;\u53ef\u4ee5\u67e5\u770bNacos\u7684\u5b98\u65b9GitHub\u6216\u8005Nacos\u9879\u76ee\u9996\u9875\u3002<\/p>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u53ea\u9700\u8981\u542f\u52a8Nacos\u6ce8\u518c\u4e2d\u5fc3&#xff0c;\u5c1d\u8bd5\u5c06\u6539\u9020\u597d\u7684coupon-template-serv\u548ccoupon-calculation-serv\u6ce8\u518c\u5230Nacos\u670d\u52a1\u5668&#xff0c;\u9a8c\u8bc1Nacos\u7684\u670d\u52a1\u6ce8\u518c\u529f\u80fd\u3002<\/p>\n<h3>\u9a8c\u8bc1Nacos\u670d\u52a1\u6ce8\u518c\u529f\u80fd<\/h3>\n<p>\u9996\u5148&#xff0c;\u6211\u4eec\u9700\u8981\u5f00\u542fNacos\u670d\u52a1\u5668&#xff0c;\u4f60\u53ef\u4ee5\u53c2\u8003\u7b2c8\u8282\u8bfe\u7684\u5185\u5bb9&#xff0c;\u4ee5\u5355\u673a\u6a21\u5f0f\u6216\u8005\u96c6\u7fa4\u6a21\u5f0f\u5f00\u542fNacos\u670d\u52a1\u5668\u3002<\/p>\n<p>\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u9700\u8981\u5728Nacos\u4e0a\u521b\u5efa\u82e5\u5e72\u4e2anamespace&#xff08;\u547d\u540d\u7a7a\u95f4&#xff09;&#xff0c;\u4f60\u9700\u5728\u4e0b\u56fe\u53f3\u4fa7\u5bfc\u822a\u680f\u627e\u5230\u201c\u547d\u540d\u7a7a\u95f4\u201d\u9875\u9762&#xff0c;\u8fdb\u5165\u8be5\u9875\u9762\u70b9\u51fb\u201c\u65b0\u589e\u547d\u540d\u7a7a\u95f4\u201d\u6309\u94ae&#xff0c;\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u4e0d\u540c\u7684\u73af\u5883&#xff1a;production\u3001pre-production\u548cdev&#xff0c;\u7528\u6765\u8868\u793a\u751f\u4ea7\u73af\u5883\u3001\u9884\u53d1\u73af\u5883\u548c\u5f00\u53d1\u73af\u5883\u3002\u5728\u521b\u5efanamespace\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u4e00\u5b9a\u8981\u4fdd\u8bc1\u547d\u540d\u7a7a\u95f4\u7684ID\u548c\u9879\u76ee\u4e2d\u7684namespace\u5c5e\u6027\u662f\u4e00\u81f4\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135803-68025a6b49258.jpg\" alt=\"\" \/><\/p>\n<p>\u521b\u5efa\u597d\u547d\u540d\u7a7a\u95f4\u4e4b\u540e&#xff0c;\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u672c\u5730\u5c1d\u8bd5\u542f\u52a8coupon-template-impl\u548ccoupon-calculation-impl\u4e24\u4e2a\u670d\u52a1\u7684Main\u65b9\u6cd5\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d&#xff0c;\u4f60\u9700\u8981\u6ce8\u610f\u63a7\u5236\u53f0\u6253\u5370\u51fa\u6765\u7684\u65e5\u5fd7\u662f\u5426\u5305\u542b\u9519\u8bef\u4fe1\u606f&#xff0c;\u5982\u679c\u6709\u5f02\u5e38\u629b\u51fa\u5219\u8981case by case\u4ed4\u7ec6\u5206\u6790\u3002<\/p>\n<p>\u5982\u679c\u5e94\u7528\u542f\u52a8\u4e00\u5207\u6b63\u5e38&#xff0c;\u90a3\u4e48\u4f60\u5c31\u53ef\u4ee5\u5728\u4e0b\u56fe\u7684Nacos\u7684\u670d\u52a1\u5217\u8868\u4e2d\u627e\u5230\u8fd9\u4e24\u4e2a\u670d\u52a1\u3002\u8bb0\u5f97\u8981\u9009\u4e2d\u4f60\u5728\u5e94\u7528\u4e2d\u914d\u7f6e\u7684namespace&#xff08;\u4e0b\u56fe\u4e0a\u65b9\u7ea2\u6846\u5904\u6807\u8bb0\u7684\u201c\u5f00\u53d1\u73af\u5883\u201d&#xff09;\u624d\u80fd\u770b\u5230\u5bf9\u5e94\u7684\u670d\u52a1\u6ce8\u518c\u60c5\u51b5\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135803-68025a6bd5184.jpg\" alt=\"\" \/><\/p>\n<p>\u597d&#xff0c;\u5230\u8fd9\u91cc&#xff0c;\u6211\u4eec\u7684\u670d\u52a1\u6ce8\u518c\u5c31\u5df2\u7ecf\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u5982\u679c\u4f60\u662f\u7b2c\u4e00\u6b21\u63a5\u89e6Nacos\u6ce8\u518c\u4e2d\u5fc3&#xff0c;\u53ef\u80fd\u4f1a\u4e0d\u5c0f\u5fc3\u8e29\u5230\u4e00\u4e9b\u5c0f\u5751\u3002\u6bd4\u5982\u8bf4\u201c\u6211\u7684\u670d\u52a1\u4e3a\u4ec0\u4e48\u6ce8\u518c\u4e0d\u4e0a\u201d\u5c31\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u95ee\u9898&#xff0c;\u8fd9\u65f6\u5019\u6709\u51e0\u4e2a\u6392\u67e5\u95ee\u9898\u7684\u65b9\u5411&#xff1a;<\/p>\n<li>\u4f60\u53ef\u4ee5\u5148\u67e5\u770b\u4e0b\u4f60\u7684\u5e94\u7528\u542f\u52a8\u65e5\u5fd7&#xff0c;\u770b\u542f\u52a8\u8fc7\u7a0b\u4e2d\u662f\u5426\u6709\u5411Nacos\u670d\u52a1\u5668\u53d1\u8d77\u6ce8\u518c\u8bf7\u6c42&#xff0c;\u5982\u679c\u6ca1\u6709\u76f8\u5173\u65e5\u5fd7&#xff0c;\u90a3\u6781\u5927\u53ef\u80fd\u662f\u4f60\u7684\u670d\u52a1\u6ce8\u518c\u529f\u80fd\u88ab\u624b\u52a8\u5173\u95ed\u4e86&#xff0c;\u6216\u8005\u6ca1\u6709\u5f15\u5165Nacos\u7684\u4f9d\u8d56\u9879\u4ee5\u542f\u52a8\u81ea\u52a8\u88c5\u914d\u529f\u80fd&#xff1b;<\/li>\n<li>\u5982\u679c\u65e5\u5fd7\u4e2d\u629b\u51fa\u4e86\u5f02\u5e38&#xff0c;\u90a3\u4e48\u8981case-by-case\u53bb\u68c0\u67e5\u5f02\u5e38\u53d1\u751f\u7684\u539f\u56e0&#xff0c;\u662fNacos\u670d\u52a1\u5668\u5730\u5740\u4e0d\u6b63\u786e&#xff0c;\u8fd8\u662f\u53c2\u6570\u8bbe\u7f6e\u4e0d\u6b63\u786e\u5bfc\u81f4\u7684&#xff1b;<\/li>\n<li>\u5f53\u65e5\u5fd7\u4e00\u5207\u6b63\u5e38&#xff0c;\u53ef\u670d\u52a1\u5217\u8868\u8fd8\u770b\u4e0d\u5230\u6570\u636e&#xff0c;\u90a3\u4e48\u4f60\u5c31\u8981\u770b\u4e00\u4e0b\u662f\u4e0d\u662f\u4f60\u5f00\u542f\u4e86\u591a\u4e2aNacos\u670d\u52a1\u5668&#xff0c;\u800c\u670d\u52a1\u5668\u4e4b\u95f4\u6ca1\u6709\u901a\u8fc7\u96c6\u7fa4\u6a21\u5f0f\u542f\u52a8\u6ce8\u518c\u8868\u540c\u6b65&#xff1b;<\/li>\n<li>\u53e6\u5916\u4f60\u8fd8\u8981\u7279\u522b\u6ce8\u610f\u4e0b\u914d\u7f6e\u53c2\u6570\u4e2d\u662f\u5426\u6307\u5b9a\u4e86Namespace&#xff0c;\u5982\u679c\u662f\u7684\u8bdd&#xff0c;\u90a3\u4e48\u670d\u52a1\u53ea\u4f1a\u51fa\u73b0\u5728\u670d\u52a1\u5217\u8868\u9875\u9762\u4e2d\u5bf9\u5e94\u7684Namespace\u6807\u7b7e\u4e0b\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f60\u597d\uff0c\u6211\u662f\u59da\u79cb\u8fb0\u3002\u4eca\u5929\u6211\u4eec\u6765\u52a8\u624b\u96c6\u6210\u4f18\u60e0\u5238\u5e73\u53f0\u9879\u76ee\u5230Nacos\u670d\u52a1\u5668\u3002\u8fd9\u4e2a\u9879\u76ee\u6211\u4eec\u5c06\u5206\u4e24\u8282\u8bfe\u6765\u8bb2\uff0c\u901a\u8fc7\u8fd9\u4e24\u8282\u8bfe\u7684\u5b66\u4e60\uff0c\u4f60\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u501f\u52a9Nacos\uff0c\u642d\u5efa\u8d77\u4e00\u4e2a\u7aef\u5230\u7aef\u7684\u5fae\u670d\u52a1\u8c03\u7528\u94fe\u8def\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u8fd8\u4f1a\u5b66\u5230Nacos\u81ea\u52a8\u88c5\u914d\u5668\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u4ee5\u53caNacos\u6838\u5fc3\u53c2\u6570\u7684\u914d\u7f6e\u3002\u638c\u63e1\u4e86\u8fd9\u4e9b\u5185\u5bb9\uff0c\u4f60\u5c31\u53ef\u4ee5\u5e73\u7a33\u9a7e\u9a6dNacos\u670d\u52a1\u6cbb\u7406\u4e86\u3002\u5728Nacos\u7684\u5730\u76d8\u4e0a\uff0c\u4e0b\u6e38\u670d\u52a1\u9700\u8981\u5148\u5c06\u81ea\u5df1\u4f5c\u4e3a\u201c\u670d\u52a1\u63d0\u4f9b\u8005\u201d\u6ce8\u518c\u5230Nacos\uff0c\u8fd9\u4e2a\u6d41\u7a0b\u53eb\u505a\u201c\u670d\u52a1\u6ce8\u518c\u201d\uff1b_\u96c6\u6210nacos<\/p>\n","protected":false},"author":2,"featured_media":15472,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,43,44],"topic":[],"class_list":["post-15477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/15477.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f60\u597d\uff0c\u6211\u662f\u59da\u79cb\u8fb0\u3002\u4eca\u5929\u6211\u4eec\u6765\u52a8\u624b\u96c6\u6210\u4f18\u60e0\u5238\u5e73\u53f0\u9879\u76ee\u5230Nacos\u670d\u52a1\u5668\u3002\u8fd9\u4e2a\u9879\u76ee\u6211\u4eec\u5c06\u5206\u4e24\u8282\u8bfe\u6765\u8bb2\uff0c\u901a\u8fc7\u8fd9\u4e24\u8282\u8bfe\u7684\u5b66\u4e60\uff0c\u4f60\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u501f\u52a9Nacos\uff0c\u642d\u5efa\u8d77\u4e00\u4e2a\u7aef\u5230\u7aef\u7684\u5fae\u670d\u52a1\u8c03\u7528\u94fe\u8def\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u8fd8\u4f1a\u5b66\u5230Nacos\u81ea\u52a8\u88c5\u914d\u5668\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u4ee5\u53caNacos\u6838\u5fc3\u53c2\u6570\u7684\u914d\u7f6e\u3002\u638c\u63e1\u4e86\u8fd9\u4e9b\u5185\u5bb9\uff0c\u4f60\u5c31\u53ef\u4ee5\u5e73\u7a33\u9a7e\u9a6dNacos\u670d\u52a1\u6cbb\u7406\u4e86\u3002\u5728Nacos\u7684\u5730\u76d8\u4e0a\uff0c\u4e0b\u6e38\u670d\u52a1\u9700\u8981\u5148\u5c06\u81ea\u5df1\u4f5c\u4e3a\u201c\u670d\u52a1\u63d0\u4f9b\u8005\u201d\u6ce8\u518c\u5230Nacos\uff0c\u8fd9\u4e2a\u6d41\u7a0b\u53eb\u505a\u201c\u670d\u52a1\u6ce8\u518c\u201d\uff1b_\u96c6\u6210nacos\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/15477.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T13:58:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135801-68025a69503d3.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15477.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/15477.html\",\"name\":\"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T13:58:05+00:00\",\"dateModified\":\"2025-04-18T13:58:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/15477.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/15477.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15477.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/15477.html","og_locale":"zh_CN","og_type":"article","og_title":"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf14\u6b21\u3002\u4f60\u597d\uff0c\u6211\u662f\u59da\u79cb\u8fb0\u3002\u4eca\u5929\u6211\u4eec\u6765\u52a8\u624b\u96c6\u6210\u4f18\u60e0\u5238\u5e73\u53f0\u9879\u76ee\u5230Nacos\u670d\u52a1\u5668\u3002\u8fd9\u4e2a\u9879\u76ee\u6211\u4eec\u5c06\u5206\u4e24\u8282\u8bfe\u6765\u8bb2\uff0c\u901a\u8fc7\u8fd9\u4e24\u8282\u8bfe\u7684\u5b66\u4e60\uff0c\u4f60\u53ef\u4ee5\u77e5\u9053\u5982\u4f55\u501f\u52a9Nacos\uff0c\u642d\u5efa\u8d77\u4e00\u4e2a\u7aef\u5230\u7aef\u7684\u5fae\u670d\u52a1\u8c03\u7528\u94fe\u8def\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u8fd8\u4f1a\u5b66\u5230Nacos\u81ea\u52a8\u88c5\u914d\u5668\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u4ee5\u53caNacos\u6838\u5fc3\u53c2\u6570\u7684\u914d\u7f6e\u3002\u638c\u63e1\u4e86\u8fd9\u4e9b\u5185\u5bb9\uff0c\u4f60\u5c31\u53ef\u4ee5\u5e73\u7a33\u9a7e\u9a6dNacos\u670d\u52a1\u6cbb\u7406\u4e86\u3002\u5728Nacos\u7684\u5730\u76d8\u4e0a\uff0c\u4e0b\u6e38\u670d\u52a1\u9700\u8981\u5148\u5c06\u81ea\u5df1\u4f5c\u4e3a\u201c\u670d\u52a1\u63d0\u4f9b\u8005\u201d\u6ce8\u518c\u5230Nacos\uff0c\u8fd9\u4e2a\u6d41\u7a0b\u53eb\u505a\u201c\u670d\u52a1\u6ce8\u518c\u201d\uff1b_\u96c6\u6210nacos","og_url":"https:\/\/www.wsisp.com\/helps\/15477.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T13:58:05+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418135801-68025a69503d3.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/15477.html","url":"https:\/\/www.wsisp.com\/helps\/15477.html","name":"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T13:58:05+00:00","dateModified":"2025-04-18T13:58:05+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/15477.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/15477.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/15477.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u96c6\u6210 Nacos\uff1a\u5982\u4f55\u5c06\u670d\u52a1\u63d0\u4f9b\u8005\u6ce8\u518c\u5230 Nacos \u670d\u52a1\u5668\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=15477"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15477\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/15472"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=15477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=15477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=15477"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=15477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}