{"id":2969,"date":"2023-07-14T17:25:15","date_gmt":"2023-07-14T09:25:15","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=2969"},"modified":"2023-07-14T17:43:08","modified_gmt":"2023-07-14T09:43:08","slug":"%e7%ae%80%e5%8c%96%e6%9c%ac%e5%9c%b0feign%e8%b0%83%e7%94%a8%ef%bc%8c%e8%80%81%e6%89%8b%e6%95%99%e4%bd%a0%e8%bf%99%e4%b9%88%e7%8e%a9","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/uncategorized\/%e7%ae%80%e5%8c%96%e6%9c%ac%e5%9c%b0feign%e8%b0%83%e7%94%a8%ef%bc%8c%e8%80%81%e6%89%8b%e6%95%99%e4%bd%a0%e8%bf%99%e4%b9%88%e7%8e%a9\/","title":{"rendered":"\u7b80\u5316\u672c\u5730Feign\u8c03\u7528\uff0c\u8001\u624b\u6559\u4f60\u8fd9\u4e48\u73a9"},"content":{"rendered":"<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"color: black;letter-spacing: 0px;font-size: 16px;padding-right: 10px;padding-left: 10px;line-height: 1.6;word-break: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;\" data-mpa-powered-by=\"yiban.io\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u5e73\u5e38\u7684\u5de5\u4f5c\u4e2d\uff0c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">OpenFeign<\/code>\u4f5c\u4e3a\u5fae\u670d\u52a1\u95f4\u7684\u8c03\u7528\u7ec4\u4ef6\u4f7f\u7528\u7684\u975e\u5e38\u666e\u904d\uff0c\u63a5\u53e3\u914d\u5408\u6ce8\u89e3\u7684\u8c03\u7528\u65b9\u5f0f\u7a81\u51fa\u4e00\u4e2a\u7b80\u4fbf\uff0c\u8ba9\u6211\u4eec\u80fd\u65e0\u9700\u5173\u6ce8\u5185\u90e8\u7ec6\u8282\u5c31\u80fd\u5b9e\u73b0\u670d\u52a1\u95f4\u7684\u63a5\u53e3\u8c03\u7528\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4f46\u662f\u5de5\u4f5c\u4e2d\u7528\u4e45\u4e86\uff0c\u53d1\u73b0Feign\u4e5f\u6709\u4e9b\u4f7f\u7528\u8d77\u6765\u9ebb\u70e6\u7684\u5730\u65b9\uff0c\u4e0b\u9762\u5148\u6765\u770b\u4e00\u4e2a\u95ee\u9898\uff0c\u518d\u770b\u770b\u6211\u4eec\u5728\u5de5\u4f5c\u4e2d\u662f\u5982\u4f55\u89e3\u51b3\uff0c\u4ee5\u8fbe\u5230\u7b80\u5316Feign\u4f7f\u7528\u7684\u76ee\u7684\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">\u5148\u770b\u95ee\u9898<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u4e00\u4e2a\u9879\u76ee\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u4f1a\u533a\u5206\u5f00\u53d1\u73af\u5883\u3001\u6d4b\u8bd5\u73af\u5883\u548c\u751f\u4ea7\u73af\u5883\uff0c\u5982\u679c\u6709\u7684\u9879\u76ee\u8981\u6c42\u66f4\u9ad8\u7684\u8bdd\uff0c\u53ef\u80fd\u8fd8\u4f1a\u6709\u4e2a\u9884\u751f\u4ea7\u73af\u5883\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5f00\u53d1\u73af\u5883\u4f5c\u4e3a\u548c\u524d\u7aef\u5f00\u53d1\u8054\u8c03\u7684\u73af\u5883\uff0c\u4e00\u822c\u4f7f\u7528\u8d77\u6765\u90fd\u6bd4\u8f83\u968f\u610f\uff0c\u800c\u6211\u4eec\u5728\u8fdb\u884c\u672c\u5730\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u6709\u65f6\u5019\u4e5f\u4f1a\u5c06\u672c\u5730\u542f\u52a8\u7684\u5fae\u670d\u52a1\u6ce8\u518c\u5230\u6ce8\u518c\u4e2d\u5fc3nacos\u4e0a\uff0c\u65b9\u4fbf\u8fdb\u884c\u8c03\u8bd5\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8fd9\u6837\uff0c\u6ce8\u518c\u4e2d\u5fc3\u7684\u4e00\u4e2a\u5fae\u670d\u52a1\u53ef\u80fd\u5c31\u4f1a\u62e5\u6709\u591a\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff0c\u5c31\u50cf\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.3698630136986301\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"876\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.3698630136986301\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png\" data-type=\"png\" data-w=\"876\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u773c\u5c16\u7684\u5c0f\u4f19\u4f34\u80af\u5b9a\u53d1\u73b0\u4e86\uff0c\u8fd9\u4e24\u4e2a\u5b9e\u4f8b\u7684ip\u5730\u5740\u6709\u4e00\u70b9\u4e0d\u540c\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7ebf\u4e0a\u73af\u5883\u73b0\u5728\u4e00\u822c\u4f7f\u7528\u5bb9\u5668\u5316\u90e8\u7f72\uff0c\u901a\u5e38\u90fd\u662f\u7531\u6d41\u6c34\u7ebf\u5de5\u5177\u6253\u6210\u955c\u50cf\u7136\u540e\u6254\u5230docker\u4e2d\u8fd0\u884c\uff0c\u56e0\u6b64\u6211\u4eec\u53bb\u770b\u4e00\u4e0b\u670d\u52a1\u5728docker\u5bb9\u5668\u5185\u7684ip\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.2125984251968504\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725117c7c1382d.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"889\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.2125984251968504\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725117c7c1382d.png\" data-type=\"png\" data-w=\"889\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u53ef\u4ee5\u770b\u5230\uff0c\u8fd9\u5c31\u662f\u6ce8\u518c\u5230nacos\u4e0a\u7684\u670d\u52a1\u5730\u5740\u4e4b\u4e00\uff0c\u800c\u5217\u8868\u4e2d<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">192<\/code>\u5f00\u5934\u7684\u53e6\u4e00\u4e2aip\uff0c\u5219\u662f\u6211\u4eec\u672c\u5730\u542f\u52a8\u7684\u670d\u52a1\u7684\u5c40\u57df\u7f51\u5730\u5740\u3002\u770b\u4e00\u4e0b\u4e0b\u9762\u8fd9\u5f20\u56fe\uff0c\u5c31\u80fd\u5bf9\u6574\u4e2a\u6d41\u7a0b\u4e00\u76ee\u4e86\u7136\u4e86\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.5548387096774193\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725110808bb88b.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"jpeg\" data-w=\"930\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5548387096774193\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725110808bb88b.png\" data-type=\"jpeg\" data-w=\"930\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u603b\u7ed3\u4e00\u4e0b\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u4e24\u4e2aservice\u90fd\u662f\u901a\u8fc7\u5bbf\u4e3b\u673a\u7684ip\u548cport\uff0c\u628a\u81ea\u5df1\u7684\u4fe1\u606f\u6ce8\u518c\u5230nacos\u4e0a<br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u7ebf\u4e0a\u73af\u5883\u7684service\u6ce8\u518c\u65f6\u4f7f\u7528docker\u5185\u90e8ip\u5730\u5740<br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u672c\u5730\u7684service\u6ce8\u518c\u65f6\u4f7f\u7528\u672c\u5730\u5c40\u57df\u7f51\u5730\u5740<br \/>\n   <\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u90a3\u4e48\u8fd9\u65f6\u5019\u95ee\u9898\u5c31\u6765\u4e86\uff0c\u5f53\u6211\u672c\u5730\u518d\u542f\u52a8\u4e00\u4e2aserviceB\uff0c\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u6765\u8c03\u7528serviceA\u4e2d\u7684\u63a5\u53e3\u65f6\uff0c\u56e0\u4e3aFeign\u672c\u8eab\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u5c31\u53ef\u80fd\u628a\u8bf7\u6c42\u8d1f\u8f7d\u5747\u8861\u5230\u4e24\u4e2a\u4e0d\u540c\u7684serviceA\u5b9e\u4f8b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5982\u679c\u8fd9\u4e2a\u8c03\u7528\u8bf7\u6c42\u88ab\u8d1f\u8f7d\u5747\u8861\u5230\u672c\u5730serviceA\u7684\u8bdd\uff0c\u90a3\u4e48\u6ca1\u4ec0\u4e48\u95ee\u9898\uff0c\u4e24\u4e2a\u670d\u52a1\u90fd\u5728\u540c\u4e00\u4e2a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">192.168<\/code>\u7f51\u6bb5\u5185\uff0c\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u3002\u4f46\u662f\u5982\u679c\u8d1f\u8f7d\u5747\u8861\u8bf7\u6c42\u5230\u8fd0\u884c\u5728docker\u5185\u7684serviceA\u7684\u8bdd\uff0c\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u56e0\u4e3a\u7f51\u7edc\u4e0d\u901a\uff0c\u6240\u4ee5\u4f1a\u8bf7\u6c42\u5931\u8d25\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.2861111111111111\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/20230714172511cfcf0fc26.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.2861111111111111\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/20230714172511cfcf0fc26.png\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8bf4\u767d\u4e86\uff0c\u5c31\u662f\u672c\u5730\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">192.168<\/code>\u548cdocker\u5185\u7684\u865a\u62df\u7f51\u6bb5<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">172.17<\/code>\u5c5e\u4e8e\u7eaf\u4e8c\u5c42\u7684\u4e24\u4e2a\u4e0d\u540c\u7f51\u6bb5\uff0c\u4e0d\u80fd\u4e92\u8bbf\uff0c\u6240\u4ee5\u65e0\u6cd5\u76f4\u63a5\u8c03\u7528\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u90a3\u4e48\uff0c\u5982\u679c\u60f3\u5728\u8c03\u8bd5\u65f6\u628a\u8bf7\u6c42\u7a33\u5b9a\u6253\u5230\u672c\u5730\u670d\u52a1\u7684\u8bdd\uff0c\u6709\u4e00\u4e2a\u529e\u6cd5\uff0c\u5c31\u662f\u6307\u5b9a\u5728<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u4e2d\u6dfb\u52a0<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u53c2\u6570\uff0c\u6307\u5b9a\u8c03\u7528\u7684\u5730\u5740\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.4108872241979069&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@FeignClient<\/span>(value&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"serviceA\"<\/span>,url&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"http:\/\/127.0.0.1:8088\/\"<\/span>)<br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">interface<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ClientA<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@GetMapping<\/span>(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"\/test\/get\"<\/span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">String&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">get<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>;<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4f46\u662f\u8fd9\u4e48\u4e00\u6765\u4e5f\u4f1a\u5e26\u6765\u70b9\u95ee\u9898\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u4ee3\u7801\u4e0a\u7ebf\u65f6\u9700\u8981\u518d\u628a\u6ce8\u89e3\u4e2d\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u5220\u6389\uff0c\u8fd8\u8981\u518d\u6b21\u4fee\u6539\u4ee3\u7801\uff0c\u5982\u679c\u5fd8\u4e86\u7684\u8bdd\u4f1a\u5f15\u8d77\u7ebf\u4e0a\u95ee\u9898<br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u5982\u679c\u6d4b\u8bd5\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u5f88\u591a\u7684\u8bdd\uff0c\u6bcf\u4e2a\u90fd\u9700\u8981\u914d\u7f6e<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u4fee\u6539\u8d77\u6765\u5f88\u9ebb\u70e6<br \/>\n   <\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u90a3\u4e48\uff0c\u6709\u4ec0\u4e48\u529e\u6cd5\u8fdb\u884c\u6539\u8fdb\u5462\uff1f\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u8fd8\u662f\u5f97\u4eceFeign\u7684\u539f\u7406\u8bf4\u8d77\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">Feign\u539f\u7406<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u9879\u76ee\u4e2d\u52a0\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@EnableFeignClients<\/code>\u8fd9\u4e2a\u6ce8\u89e3\uff0c\u5b9e\u73b0\u65f6\u6709\u4e00\u884c\u5f88\u91cd\u8981\u7684\u4ee3\u7801\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.17009891299445656&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Import<\/span>(FeignClientsRegistrar<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<br><\/span><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8fd9\u4e2a\u7c7b\u5b9e\u73b0\u4e86<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ImportBeanDefinitionRegistrar<\/code>\u63a5\u53e3\uff0c\u5728\u8fd9\u4e2a\u63a5\u53e3\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">registerBeanDefinitions<\/code>\u65b9\u6cd5\u4e2d\uff0c\u53ef\u4ee5\u624b\u52a8\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u5e76\u6ce8\u518c\uff0c\u4e4b\u540espring\u4f1a\u6839\u636e<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u5b9e\u4f8b\u5316\u751f\u6210bean\uff0c\u5e76\u653e\u5165\u5bb9\u5668\u4e2d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">Feign\u5c31\u662f\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u626b\u63cf\u6dfb\u52a0\u4e86<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@FeignClient<\/code>\u6ce8\u89e3\u7684\u63a5\u53e3\uff0c\u7136\u540e\u4e00\u6b65\u6b65\u751f\u6210\u4ee3\u7406\u5bf9\u8c61\uff0c\u5177\u4f53\u6d41\u7a0b\u53ef\u4ee5\u770b\u4e00\u4e0b\u4e0b\u9762\u8fd9\u5f20\u56fe\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.7572139303482587\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/2023071417251159597039a.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"jpeg\" data-w=\"1005\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.7572139303482587\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/2023071417251159597039a.png\" data-type=\"jpeg\" data-w=\"1005\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u540e\u7eed\u5728\u8bf7\u6c42\u65f6\uff0c\u901a\u8fc7\u4ee3\u7406\u5bf9\u8c61\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignInvocationHandler<\/code>\u8fdb\u884c\u62e6\u622a\uff0c\u5e76\u6839\u636e\u5bf9\u5e94\u65b9\u6cd5\u8fdb\u884c\u5904\u7406\u5668\u7684\u5206\u53d1\uff0c\u5b8c\u6210\u540e\u7eed\u7684http\u8bf7\u6c42\u64cd\u4f5c\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">ImportBeanDefinitionRegistrar<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e0a\u9762\u63d0\u5230\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ImportBeanDefinitionRegistrar<\/code>\uff0c\u5728\u6574\u4e2a\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u7684\u4ee3\u7406\u8fc7\u7a0b\u4e2d\u975e\u5e38\u91cd\u8981\uff0c \u6240\u4ee5\u6211\u4eec\u5148\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u770b\u4e00\u4e0b\u5b83\u7684\u7528\u6cd5\u3002\u5148\u5b9a\u4e49\u4e00\u4e2a\u5b9e\u4f53\u7c7b\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.6567343513912629&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Data<\/span><br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@AllArgsConstructor<\/span><br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">User<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;Long&nbsp;id;<br>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;name;<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinitionBuilder<\/code>\uff0c\u5411\u8fd9\u4e2a\u5b9e\u4f53\u7c7b\u7684\u6784\u9020\u65b9\u6cd5\u4e2d\u4f20\u5165\u5177\u4f53\u503c\uff0c\u6700\u540e\u751f\u6210\u4e00\u4e2a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.21926916907354155&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">MyBeanDefinitionRegistrar<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">implements<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ImportBeanDefinitionRegistrar<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Override<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">registerBeanDefinitions<\/span><span style=\"line-height: 26px;\">(AnnotationMetadata&nbsp;importingClassMetadata,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BeanDefinitionRegistry&nbsp;registry)<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BeanDefinitionBuilder&nbsp;builder<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;BeanDefinitionBuilder.genericBeanDefinition(User<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;builder.addConstructorArgValue(<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">1L<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;builder.addConstructorArgValue(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"Hydra\"<\/span>);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AbstractBeanDefinition&nbsp;beanDefinition&nbsp;=&nbsp;builder.getBeanDefinition();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;registry.registerBeanDefinition(User<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>.<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">getSimpleName<\/span>(),<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">beanDefinition<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\"><code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">registerBeanDefinitions<\/code>\u65b9\u6cd5\u7684\u5177\u4f53\u8c03\u7528\u65f6\u95f4\u662f\u5728\u4e4b\u540e\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ConfigurationClassPostProcessor<\/code>\u6267\u884c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">postProcessBeanDefinitionRegistry<\/code>\u65b9\u6cd5\u65f6\uff0c\u800c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">registerBeanDefinition<\/code>\u65b9\u6cd5\u5219\u4f1a\u5c06<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u653e\u8fdb\u4e00\u4e2amap\u4e2d\uff0c\u540e\u7eed\u6839\u636e\u5b83\u5b9e\u4f8b\u5316bean\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u914d\u7f6e\u7c7b\u4e0a\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@Import<\/code>\u5c06\u5176\u5f15\u5165\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.9872952012857532&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Configuration<\/span><br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Import<\/span>(MyBeanDefinitionRegistrar<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<br><span style=\"color: rgb(230, 192, 123);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">MyConfiguration<\/span>&nbsp;<\/span>{<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6ce8\u5165\u8fd9\u4e2a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">User<\/code>\u6d4b\u8bd5\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.13938223160864505&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Service<\/span><br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@RequiredArgsConstructor<\/span><br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">UserService<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">final<\/span>&nbsp;User&nbsp;user;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">getUser<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(user.toString());<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7ed3\u679c\u6253\u5370\uff0c\u8bf4\u660e\u6211\u4eec\u901a\u8fc7\u81ea\u5b9a\u4e49<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u7684\u65b9\u5f0f\u6210\u529f\u624b\u52a8\u521b\u5efa\u4e86\u4e00\u4e2abean\u5e76\u653e\u5165\u4e86spring\u5bb9\u5668\u4e2d\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.49372382529905545&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\">User(id=1, name=Hydra)<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u597d\u4e86\uff0c\u51c6\u5907\u5de5\u4f5c\u94fa\u57ab\u5230\u8fd9\u7ed3\u675f\uff0c\u4e0b\u9762\u5f00\u59cb\u6b63\u5f0f\u7684\u6539\u9020\u5de5\u4f5c\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">\u6539\u9020<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5230\u8fd9\u91cc\u5148\u603b\u7ed3\u4e00\u4e0b\uff0c\u6211\u4eec\u7ea0\u7ed3\u7684\u70b9\u5c31\u662f\u672c\u5730\u73af\u5883\u9700\u8981<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u4e2d\u914d\u7f6e<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u4f46\u7ebf\u4e0a\u73af\u5883\u4e0d\u9700\u8981\uff0c\u5e76\u4e14\u6211\u4eec\u53c8\u4e0d\u60f3\u6765\u56de\u4fee\u6539\u4ee3\u7801\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u9664\u4e86\u50cf\u6e90\u7801\u4e2d\u90a3\u6837\u751f\u6210\u52a8\u6001\u4ee3\u7406\u4ee5\u53ca\u62e6\u622a\u65b9\u6cd5\uff0c\u5b98\u65b9\u6587\u6863\u4e2d\u8fd8\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u4e2a\u624b\u52a8\u521b\u5efaFeignClient\u7684\u65b9\u6cd5\u3002<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-top: none;border-right: none;border-bottom: none;font-size: 0.9em;overflow: auto;border-left-color: rgb(239, 112, 96);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;background: rgb(255, 249, 249);\">\n<p style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;color: black;line-height: 26px;\">https:\/\/docs.spring.io\/spring-cloud-openfeign\/docs\/2.2.9.RELEASE\/reference\/html\/#creating-feign-clients-manually<\/p>\n<\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u6211\u4eec\u53ef\u4ee5\u50cf\u4e0b\u9762\u8fd9\u6837\uff0c\u901a\u8fc7Feign\u7684Builder API\u6765\u624b\u52a8\u521b\u5efa\u4e00\u4e2aFeign\u5ba2\u6237\u7aef\u3002<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.46296296296296297\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512f7f78eb47.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.46296296296296297\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512f7f78eb47.png\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7b80\u5355\u770b\u4e00\u4e0b\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u8fd8\u9700\u8981\u914d\u7f6e<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Client<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Encoder<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Decoder<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Contract<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">RequestInterceptor<\/code>\u7b49\u5185\u5bb9\u3002<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Client<\/code>\uff1a\u5b9e\u9645http\u8bf7\u6c42\u7684\u53d1\u8d77\u8005\uff0c\u5982\u679c\u4e0d\u6d89\u53ca\u8d1f\u8f7d\u5747\u8861\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Client.Default<\/code>\uff0c\u7528\u5230\u8d1f\u8f7d\u5747\u8861\u5219\u53ef\u4ee5\u4f7f\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LoadBalancerFeignClient<\/code>\uff0c\u524d\u9762\u4e5f\u8bf4\u4e86\uff0c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LoadBalancerFeignClient<\/code>\u4e2d\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">delegate<\/code>\u5176\u5b9e\u4f7f\u7528\u7684\u4e5f\u662f<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Client.Default<\/code><br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Encoder<\/code>\u548c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Decoder<\/code>\uff1aFeign\u7684\u7f16\u89e3\u7801\u5668\uff0c\u5728spring\u9879\u76ee\u4e2d\u4f7f\u7528\u5bf9\u5e94\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">SpringEncoder<\/code>\u548c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ResponseEntityDecoder<\/code>\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u6211\u4eec\u501f\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">GsonHttpMessageConverter<\/code>\u4f5c\u4e3a\u6d88\u606f\u8f6c\u6362\u5668\u6765\u89e3\u6790json<br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">RequestInterceptor<\/code>\uff1aFeign\u7684\u62e6\u622a\u5668\uff0c\u4e00\u822c\u4e1a\u52a1\u7528\u9014\u6bd4\u8f83\u591a\uff0c\u6bd4\u5982\u6dfb\u52a0\u4fee\u6539header\u4fe1\u606f\u7b49\uff0c\u8fd9\u91cc\u7528\u4e0d\u5230\u53ef\u4ee5\u4e0d\u914d<br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    <code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Contract<\/code>\uff1a\u5b57\u9762\u610f\u601d\u662f\u5408\u7ea6\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u5c06\u6211\u4eec\u4f20\u5165\u7684\u63a5\u53e3\u8fdb\u884c\u89e3\u6790\u9a8c\u8bc1\uff0c\u770b\u6ce8\u89e3\u7684\u4f7f\u7528\u662f\u5426\u7b26\u5408\u89c4\u8303\uff0c\u7136\u540e\u5c06\u5173\u4e8ehttp\u7684\u5143\u6570\u636e\u62bd\u53d6\u6210\u7ed3\u679c\u5e76\u8fd4\u56de\u3002\u5982\u679c\u6211\u4eec\u4f7f\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">RequestMapping<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">PostMapping<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">GetMapping<\/code>\u4e4b\u7c7b\u6ce8\u89e3\u7684\u8bdd\uff0c\u90a3\u4e48\u5bf9\u5e94\u4f7f\u7528\u7684\u662f<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">SpringMvcContract<\/code><br \/>\n   <\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5176\u5b9e\u8fd9\u91cc\u521a\u9700\u7684\u5c31\u53ea\u6709<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Contract<\/code>\u8fd9\u4e00\u4e2a\uff0c\u5176\u4ed6\u90fd\u662f\u53ef\u9009\u7684\u914d\u7f6e\u9879\u3002\u6211\u4eec\u5199\u4e00\u4e2a\u914d\u7f6e\u7c7b\uff0c\u628a\u8fd9\u4e9b\u9700\u8981\u7684\u4e1c\u897f\u90fd\u6ce8\u5165\u8fdb\u53bb\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.9465002557880013&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Slf<\/span>4j<br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Configuration<\/span>(proxyBeanMethods&nbsp;=&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">false<\/span>)<br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@EnableConfigurationProperties<\/span>({LocalFeignProperties<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>})<br>@<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">Import<\/span>(<\/span>{LocalFeignClientRegistrar<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>})<br>@<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ConditionalOnProperty<\/span>(<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">value<\/span>&nbsp;<\/span>=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"feign.local.enable\"<\/span>,&nbsp;havingValue&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"true\"<\/span>)<br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">FeignAutoConfiguration<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">static<\/span>&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"feign&nbsp;local&nbsp;route&nbsp;started\"<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Bean<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Primary<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;Contract&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">contract<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;SpringMvcContract();<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Bean<\/span>(name&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"defaultClient\"<\/span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;Client&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">defaultClient<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;Client.Default(<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">null<\/span>,<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">null<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Bean<\/span>(name&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"ribbonClient\"<\/span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;Client&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">ribbonClient<\/span><span style=\"line-height: 26px;\">(CachingSpringLoadBalancerFactory&nbsp;cachingFactory,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SpringClientFactory&nbsp;clientFactory)<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;LoadBalancerFeignClient(defaultClient(),&nbsp;cachingFactory,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clientFactory);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Bean<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;Decoder&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">decoder<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpMessageConverter&nbsp;httpMessageConverter=<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;GsonHttpMessageConverter();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ObjectFactory&lt;HttpMessageConverters&gt;&nbsp;messageConverters=&nbsp;()&nbsp;-&gt;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;HttpMessageConverters(httpMessageConverter);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SpringDecoder&nbsp;springDecoder&nbsp;=&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;SpringDecoder(messageConverters);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;ResponseEntityDecoder(springDecoder);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Bean<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;Encoder&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">encoder<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpMessageConverter&nbsp;httpMessageConverter=<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;GsonHttpMessageConverter();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ObjectFactory&lt;HttpMessageConverters&gt;&nbsp;messageConverters=&nbsp;()&nbsp;-&gt;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;HttpMessageConverters(httpMessageConverter);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;SpringEncoder(messageConverters);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u8fd9\u4e2a\u914d\u7f6e\u7c7b\u4e0a\uff0c\u8fd8\u6709\u4e09\u884c\u6ce8\u89e3\uff0c\u6211\u4eec\u4e00\u70b9\u70b9\u89e3\u91ca\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u9996\u5148\u662f\u5f15\u5165\u7684\u914d\u7f6e\u7c7b<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LocalFeignProperties<\/code>\uff0c\u91cc\u9762\u6709\u4e09\u4e2a\u5c5e\u6027\uff0c\u5206\u522b\u662f\u662f\u5426\u5f00\u542f\u672c\u5730\u8def\u7531\u7684\u5f00\u5173\u3001\u626b\u63cfFeignClient\u63a5\u53e3\u7684\u5305\u540d\uff0c\u4ee5\u53ca\u6211\u4eec\u8981\u505a\u7684\u672c\u5730\u8def\u7531\u6620\u5c04\u5173\u7cfb\uff0c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">addressMapping<\/code>\u4e2d\u5b58\u7684\u662f\u670d\u52a1\u540d\u548c\u5bf9\u5e94\u7684url\u5730\u5740\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.9169511846127396&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Data<\/span><br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Component<\/span><br><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@ConfigurationProperties<\/span>(prefix&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"feign.local\"<\/span>)<br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">LocalFeignProperties<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/&nbsp;\u662f\u5426\u5f00\u542f\u672c\u5730\u8def\u7531<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;String&nbsp;enable;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/\u626b\u63cfFeignClient\u7684\u5305\u540d<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;String&nbsp;basePackage;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/\u8def\u7531\u5730\u5740\u6620\u5c04<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;Map&lt;String,String&gt;&nbsp;addressMapping;<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4e0b\u9762\u8fd9\u884c\u6ce8\u89e3\u5219\u8868\u793a\u53ea\u6709\u5f53\u914d\u7f6e\u6587\u4ef6\u4e2d<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">feign.local.enable<\/code>\u8fd9\u4e2a\u5c5e\u6027\u4e3a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">true<\/code>\u65f6\uff0c\u624d\u4f7f\u5f53\u524d\u914d\u7f6e\u6587\u4ef6\u751f\u6548\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.48039643561749057&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@ConditionalOnProperty<\/span>(value&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"feign.local.enable\"<\/span>,&nbsp;havingValue&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"true\"<\/span>)<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6700\u540e\uff0c\u5c31\u662f\u6211\u4eec\u91cd\u4e2d\u4e4b\u91cd\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LocalFeignClientRegistrar<\/code>\u4e86\uff0c\u6211\u4eec\u8fd8\u662f\u6309\u7167\u5b98\u65b9\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ImportBeanDefinitionRegistrar<\/code>\u63a5\u53e3\u6784\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u7136\u540e\u6ce8\u518c\u7684\u601d\u8def\u6765\u5b9e\u73b0\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5e76\u4e14\uff0c<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClientsRegistrar<\/code>\u7684\u6e90\u7801\u4e2d\u5df2\u7ecf\u5b9e\u73b0\u597d\u4e86\u5f88\u591a\u57fa\u7840\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u626b\u626b\u63cf\u5305\u3001\u83b7\u53d6<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">name<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">contextId<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u7b49\u7b49\uff0c\u6240\u4ee5\u9700\u8981\u6539\u52a8\u7684\u5730\u65b9\u975e\u5e38\u5c11\uff0c\u53ef\u4ee5\u653e\u5fc3\u7684\u5927\u6284\u7279\u8d85\u5b83\u7684\u4ee3\u7801\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5148\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LocalFeignClientRegistrar<\/code>\uff0c\u5e76\u6ce8\u5165\u9700\u8981\u7528\u5230\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">ResourceLoader<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanFactory<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Environment<\/code>\u3002<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.2777457047996936&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Slf<\/span>4j<br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">LocalFeignClientRegistrar<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">implements<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ImportBeanDefinitionRegistrar<\/span>,&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ResourceLoaderAware<\/span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">EnvironmentAware<\/span>,&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">BeanFactoryAware<\/span><\/span>{<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;ResourceLoader&nbsp;resourceLoader;<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;BeanFactory&nbsp;beanFactory;<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;Environment&nbsp;environment;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Override<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">setResourceLoader<\/span><span style=\"line-height: 26px;\">(ResourceLoader&nbsp;resourceLoader)<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">this<\/span>.resourceLoader=resourceLoader;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Override<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">setBeanFactory<\/span><span style=\"line-height: 26px;\">(BeanFactory&nbsp;beanFactory)<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">throws<\/span>&nbsp;BeansException&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">this<\/span>.beanFactory&nbsp;=&nbsp;beanFactory;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Override<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">setEnvironment<\/span><span style=\"line-height: 26px;\">(Environment&nbsp;environment)<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">this<\/span>.environment=environment;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;<br>&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/\u5148\u7701\u7565\u5177\u4f53\u529f\u80fd\u4ee3\u7801...<\/span><br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7136\u540e\u770b\u4e00\u4e0b\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u524d\u7684\u5de5\u4f5c\uff0c\u8fd9\u4e00\u90e8\u5206\u4e3b\u8981\u5b8c\u6210\u4e86\u5305\u7684\u626b\u63cf\u548c\u68c0\u6d4b<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@FeignClient<\/code>\u6ce8\u89e3\u662f\u5426\u88ab\u6dfb\u52a0\u5728\u63a5\u53e3\u4e0a\u7684\u6d4b\u8bd5\u3002\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\u57fa\u672c\u4e0a\u662f\u7167\u642c\u6e90\u7801\uff0c\u9664\u4e86\u6539\u52a8\u4e00\u4e0b\u626b\u63cf\u5305\u7684\u8def\u5f84\uff0c\u4f7f\u7528\u6211\u4eec\u81ea\u5df1\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684\u5305\u540d\u3002<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.537699187304816&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@Override<\/span><br><span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">registerBeanDefinitions<\/span><span style=\"line-height: 26px;\">(AnnotationMetadata&nbsp;importingClassMetadata,&nbsp;BeanDefinitionRegistry&nbsp;registry)<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;ClassPathScanningCandidateComponentProvider&nbsp;scanner&nbsp;=&nbsp;ComponentScanner.getScanner(environment);<br>&nbsp;&nbsp;&nbsp;&nbsp;scanner.setResourceLoader(resourceLoader);<br>&nbsp;&nbsp;&nbsp;&nbsp;AnnotationTypeFilter&nbsp;annotationTypeFilter&nbsp;=&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;AnnotationTypeFilter(FeignClient<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;scanner.addIncludeFilter(annotationTypeFilter);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;basePackage&nbsp;=environment.getProperty(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"feign.local.basePackage\"<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;log.info(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"begin&nbsp;to&nbsp;scan&nbsp;{}\"<\/span>,basePackage);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Set&lt;BeanDefinition&gt;&nbsp;candidateComponents&nbsp;=&nbsp;scanner.findCandidateComponents(basePackage);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">for<\/span>&nbsp;(BeanDefinition&nbsp;candidateComponent&nbsp;:&nbsp;candidateComponents)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">if<\/span>&nbsp;(candidateComponent&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">instanceof<\/span>&nbsp;AnnotatedBeanDefinition)&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;log.info(candidateComponent.getBeanClassName());<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/&nbsp;verify&nbsp;annotated&nbsp;class&nbsp;is&nbsp;an&nbsp;interface<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AnnotatedBeanDefinition&nbsp;beanDefinition&nbsp;=&nbsp;(AnnotatedBeanDefinition)&nbsp;candidateComponent;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AnnotationMetadata&nbsp;annotationMetadata&nbsp;=&nbsp;beanDefinition.getMetadata();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assert.isTrue(annotationMetadata.isInterface(),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"@FeignClient&nbsp;can&nbsp;only&nbsp;be&nbsp;specified&nbsp;on&nbsp;an&nbsp;interface\"<\/span>);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map&lt;String,&nbsp;Object&gt;&nbsp;attributes&nbsp;=&nbsp;annotationMetadata<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.getAnnotationAttributes(FeignClient<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>.<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">getCanonicalName<\/span>())<\/span>;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;name&nbsp;=&nbsp;FeignCommonUtil.getClientName(attributes);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;registerFeignClient(registry,&nbsp;annotationMetadata,&nbsp;attributes);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u63a5\u4e0b\u6765\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">BeanDefinition<\/code>\u5e76\u6ce8\u518c\uff0cFeign\u7684\u6e90\u7801\u4e2d\u662f\u4f7f\u7528\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClientFactoryBean<\/code>\u521b\u5efa\u4ee3\u7406\u5bf9\u8c61\uff0c\u8fd9\u91cc\u6211\u4eec\u5c31\u4e0d\u9700\u8981\u4e86\uff0c\u76f4\u63a5\u66ff\u6362\u6210\u4f7f\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Feign.builder<\/code>\u521b\u5efa\u3002<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.9660575659711113&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">private<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">registerFeignClient<\/span><span style=\"line-height: 26px;\">(BeanDefinitionRegistry&nbsp;registry,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AnnotationMetadata&nbsp;annotationMetadata,&nbsp;Map&lt;String,&nbsp;Object&gt;&nbsp;attributes)<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;className&nbsp;=&nbsp;annotationMetadata.getClassName();<br>&nbsp;&nbsp;&nbsp;&nbsp;Class&nbsp;clazz&nbsp;=&nbsp;ClassUtils.resolveClassName(className,&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">null<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;ConfigurableBeanFactory&nbsp;beanFactory&nbsp;=&nbsp;registry&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">instanceof<\/span>&nbsp;ConfigurableBeanFactory<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;(ConfigurableBeanFactory)&nbsp;registry&nbsp;:&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">null<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;contextId&nbsp;=&nbsp;FeignCommonUtil.getContextId(beanFactory,&nbsp;attributes,environment);<br>&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;name&nbsp;=&nbsp;FeignCommonUtil.getName(attributes,environment);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;BeanDefinitionBuilder&nbsp;definition&nbsp;=&nbsp;BeanDefinitionBuilder<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.genericBeanDefinition(clazz,&nbsp;()&nbsp;-&gt;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contract&nbsp;contract&nbsp;=&nbsp;beanFactory.getBean(Contract<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client&nbsp;defaultClient&nbsp;=&nbsp;(Client)&nbsp;beanFactory.getBean(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"defaultClient\"<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client&nbsp;ribbonClient&nbsp;=&nbsp;(Client)&nbsp;beanFactory.getBean(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"ribbonClient\"<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encoder&nbsp;encoder&nbsp;=&nbsp;beanFactory.getBean(Encoder<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decoder&nbsp;decoder&nbsp;=&nbsp;beanFactory.getBean(Decoder<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalFeignProperties&nbsp;properties&nbsp;=&nbsp;beanFactory.getBean(LocalFeignProperties<span style=\"line-height: 26px;\">.<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">class<\/span>)<\/span>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map&lt;String,&nbsp;String&gt;&nbsp;addressMapping&nbsp;=&nbsp;properties.getAddressMapping();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Feign.Builder&nbsp;builder&nbsp;=&nbsp;Feign.builder()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.encoder(encoder)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.decoder(decoder)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.contract(contract);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;serviceUrl&nbsp;=&nbsp;addressMapping.get(name);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;originUrl&nbsp;=&nbsp;FeignCommonUtil.getUrl(beanFactory,&nbsp;attributes,&nbsp;environment);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object&nbsp;target;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">if<\/span>&nbsp;(StringUtils.hasText(serviceUrl)){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;=&nbsp;builder.client(defaultClient)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.target(clazz,&nbsp;serviceUrl);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">else<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">if<\/span>&nbsp;(StringUtils.hasText(originUrl)){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;=&nbsp;builder.client(defaultClient)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.target(clazz,originUrl);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">else<\/span>&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;=&nbsp;builder.client(ribbonClient)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.target(clazz,<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"http:\/\/\"<\/span>+name);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">return<\/span>&nbsp;target;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br><br>&nbsp;&nbsp;&nbsp;&nbsp;definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_BY_TYPE);<br>&nbsp;&nbsp;&nbsp;&nbsp;definition.setLazyInit(<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">true<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;FeignCommonUtil.validate(attributes);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;AbstractBeanDefinition&nbsp;beanDefinition&nbsp;=&nbsp;definition.getBeanDefinition();<br>&nbsp;&nbsp;&nbsp;&nbsp;beanDefinition.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE,&nbsp;className);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);font-style: italic;line-height: 26px;\">\/\/&nbsp;has&nbsp;a&nbsp;default,&nbsp;won't&nbsp;be&nbsp;null<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">boolean<\/span>&nbsp;primary&nbsp;=&nbsp;(Boolean)&nbsp;attributes.get(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"primary\"<\/span>);<br>&nbsp;&nbsp;&nbsp;&nbsp;beanDefinition.setPrimary(primary);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;String[]&nbsp;qualifiers&nbsp;=&nbsp;FeignCommonUtil.getQualifiers(attributes);<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">if<\/span>&nbsp;(ObjectUtils.isEmpty(qualifiers))&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qualifiers&nbsp;=&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;String[]&nbsp;{&nbsp;contextId&nbsp;+&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"FeignClient\"<\/span>&nbsp;};<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;BeanDefinitionHolder&nbsp;holder&nbsp;=&nbsp;<span style=\"color: rgb(198, 120, 221);line-height: 26px;\">new<\/span>&nbsp;BeanDefinitionHolder(beanDefinition,&nbsp;className,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qualifiers);<br>&nbsp;&nbsp;&nbsp;&nbsp;BeanDefinitionReaderUtils.registerBeanDefinition(holder,&nbsp;registry);<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u4e3b\u8981\u505a\u4e86\u8fd9\u4e48\u51e0\u4ef6\u4e8b\uff1a<\/p>\n<ul data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">beanFactory<\/code>\u62ff\u5230\u4e86\u6211\u4eec\u5728\u524d\u9762\u521b\u5efa\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Client<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Encoder<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Decoder<\/code>\u3001<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Contract<\/code>\uff0c\u7528\u6765\u6784\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">Feign.Builder<\/code><br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u901a\u8fc7\u6ce8\u5165\u914d\u7f6e\u7c7b\uff0c\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">addressMapping<\/code>\u62ff\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u670d\u52a1\u5bf9\u5e94\u7684\u8c03\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code><br \/>\n   <\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);\">\n    \u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">target<\/code>\u65b9\u6cd5\u66ff\u6362\u8981\u8bf7\u6c42\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u5982\u679c\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b58\u5728\u5219\u4f18\u5148\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u4e2d<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u5426\u5219\u4f7f\u7528<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@FeignClient<\/code>\u6ce8\u89e3\u4e2d\u914d\u7f6e\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u5982\u679c\u90fd\u6ca1\u6709\u5219\u4f7f\u7528\u670d\u52a1\u540d\u901a\u8fc7<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">LoadBalancerFeignClient<\/code>\u8bbf\u95ee<br \/>\n   <\/section>\n<\/li>\n<\/ul>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">resources\/META-INF<\/code>\u76ee\u5f55\u4e0b\u521b\u5efa<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">spring.factories<\/code>\u6587\u4ef6\uff0c\u901a\u8fc7spi\u6ce8\u518c\u6211\u4eec\u7684\u81ea\u52a8\u914d\u7f6e\u7c7b\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.2639736223406015&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\">org.springframework.boot.autoconfigure.EnableAutoConfiguration=\\<br>  com.feign.local.config.FeignAutoConfiguration<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6700\u540e\uff0c\u672c\u5730\u6253\u5305\u5373\u53ef\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.9062040239240106&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\">mvn&nbsp;clean&nbsp;install<br><\/code><\/pre>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">\u6d4b\u8bd5<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5f15\u5165\u6211\u4eec\u5728\u4e0a\u9762\u6253\u597d\u7684\u5305\uff0c\u7531\u4e8e\u5305\u4e2d\u5df2\u7ecf\u5305\u542b\u4e86<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">spring-cloud-starter-openfeign<\/code>\uff0c\u6240\u4ee5\u5c31\u4e0d\u9700\u8981\u518d\u989d\u5916\u5f15<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">feign<\/code>\u7684\u5305\u4e86\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.1413038374213742&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"line-height: 26px;\">&lt;<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">dependency<\/span>&gt;<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">&lt;<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">groupId<\/span>&gt;<\/span>com.cn.hydra<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">groupId<\/span>&gt;<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">&lt;<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">artifactId<\/span>&gt;<\/span>feign-local-enhancer<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">artifactId<\/span>&gt;<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">&lt;<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">version<\/span>&gt;<\/span>1.0-SNAPSHOT<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">version<\/span>&gt;<\/span><br><span style=\"line-height: 26px;\">&lt;\/<span style=\"color: rgb(224, 108, 117);line-height: 26px;\">dependency<\/span>&gt;<\/span><br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u914d\u7f6e\u4fe1\u606f\uff0c\u542f\u7528\u7ec4\u4ef6\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.275341453809512&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(209, 154, 102);line-height: 26px;\">feign:<\/span><br>&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">local:<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">enable:<\/span>&nbsp;<span style=\"color: rgb(86, 182, 194);line-height: 26px;\">true<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">basePackage:<\/span>&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">com.service<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">addressMapping:<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">hydra-service:<\/span>&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">http:\/\/127.0.0.1:8088<\/span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(209, 154, 102);line-height: 26px;\">trunks-service:<\/span>&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">http:\/\/127.0.0.1:8099<\/span><br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u521b\u5efa\u4e00\u4e2a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u63a5\u53e3\uff0c\u6ce8\u89e3\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u4e2d\u6211\u4eec\u53ef\u4ee5\u968f\u4fbf\u5199\u4e00\u4e2a\u5730\u5740\uff0c\u53ef\u4ee5\u7528\u6765\u6d4b\u8bd5\u4e4b\u540e\u662f\u5426\u4f1a\u88ab\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u670d\u52a1\u5730\u5740\u8986\u76d6\uff1a<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/mmbiz.qpic.cn\/mmbiz_svg\/CkBYF6IYNs0K9AZ1YYTwjtLEzs5QcxZQMeE5G7vc8ZXu9MdcmTzyicb7ljQeGnHqsOVO1bv297SF3mKpNnE5YuIKFYf2QwKgS\/640?wx_fmt=svg&amp;random=0.5163601517572756&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 747px;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);display: -webkit-box;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;font-size: 12px;background: rgb(40, 44, 52);border-radius: 5px;\"><span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@FeignClient<\/span>(value&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"hydra-service\"<\/span>,<br>&nbsp;contextId&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"hydra-serviceA\"<\/span>,<br>&nbsp;url&nbsp;=&nbsp;<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"http:\/\/127.0.0.1:8099\/\"<\/span>)<br><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">public<\/span>&nbsp;<span style=\"line-height: 26px;\"><span style=\"color: rgb(198, 120, 221);line-height: 26px;\">interface<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);line-height: 26px;\">ClientA<\/span>&nbsp;<\/span>{<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@GetMapping<\/span>(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"\/test\/get\"<\/span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">String&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">get<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">@GetMapping<\/span>(<span style=\"color: rgb(152, 195, 121);line-height: 26px;\">\"\/test\/user\"<\/span>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"line-height: 26px;\">User&nbsp;<span style=\"color: rgb(97, 174, 238);line-height: 26px;\">getUser<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>;<br>}<br><\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u542f\u52a8\u670d\u52a1\uff0c\u8fc7\u7a0b\u4e2d\u53ef\u4ee5\u770b\u89c1\u4e86\u6267\u884c\u626b\u63cf\u5305\u7684\u64cd\u4f5c\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.31574074074074077\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512b9b9d1b3e.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.31574074074074077\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512b9b9d1b3e.png\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5728\u66ff\u6362<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u8fc7\u7a0b\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65ad\u70b9\uff0c\u53ef\u4ee5\u770b\u5230\u5373\u4f7f\u5728\u6ce8\u89e3\u4e2d\u914d\u7f6e\u4e86<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\uff0c\u4e5f\u4f1a\u4f18\u5148\u88ab\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u670d\u52a1<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u8986\u76d6\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.39537037037037037\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513707034025.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.39537037037037037\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513707034025.png\" data-type=\"png\" data-w=\"1080\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4f7f\u7528\u63a5\u53e3\u8fdb\u884c\u6d4b\u8bd5\uff0c\u53ef\u4ee5\u770b\u5230\u4f7f\u7528\u4e0a\u9762\u7684\u4ee3\u7406\u5bf9\u8c61\u8fdb\u884c\u4e86\u8bbf\u95ee\u5e76\u6210\u529f\u8fd4\u56de\u4e86\u7ed3\u679c\uff1a<\/p>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\">\n  <img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.28998073217726394\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513b9b95f8cd.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1038\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.28998073217726394\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513b9b95f8cd.png\" data-type=\"png\" data-w=\"1038\" style=\"display: block;margin-right: auto;margin-left: auto;height: auto !important;\"><\/noscript><br \/>\n <\/figure>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u5982\u679c\u9879\u76ee\u9700\u8981\u53d1\u5e03\u6b63\u5f0f\u73af\u5883\uff0c\u53ea\u9700\u8981\u5c06\u914d\u7f6e<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">feign.local.enable<\/code>\u6539\u4e3a<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">false<\/code>\u6216\u5220\u6389\uff0c\u5e76\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0Feign\u539f\u59cb\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">@EnableFeignClients<\/code>\u5373\u53ef\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;\"><span style=\"display: inline-block;background: rgb(239, 112, 96);color: rgb(255, 255, 255);padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;\">\u603b\u7ed3<\/span><span style=\"display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u672c\u6587\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5728\u672c\u5730\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7b80\u5316Feign\u8c03\u7528\u7684\u601d\u8def\uff0c\u76f8\u6bd4\u4e4b\u524d\u9700\u8981\u9ebb\u70e6\u7684\u4fee\u6539<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">FeignClient<\/code>\u4e2d\u7684<code style=\"font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(239, 112, 96);\">url<\/code>\u800c\u8a00\uff0c\u80fd\u591f\u8282\u7701\u4e0d\u5c11\u7684\u65e0\u6548\u52b3\u52a8\uff0c\u5e76\u4e14\u901a\u8fc7\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u5927\u5bb6\u4e86\u89e3\u6211\u4eec\u5e73\u5e38\u4f7f\u7528\u7684\u8fd9\u4e9b\u7ec4\u4ef6\u662f\u600e\u4e48\u4e0espring\u7ed3\u5408\u5728\u4e00\u8d77\u7684\uff0c\u719f\u6089spring\u7684\u6269\u5c55\u70b9\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7ec4\u4ef6\u4ee3\u7801\u5df2\u63d0\u4ea4\u5230\u6211\u7684github\uff0c\u6709\u9700\u8981\u7684\u5c0f\u4f19\u4f34\u4eec\u53ef\u4ee5\u81ea\u53d6\uff0c\u7801\u5b57\u4e0d\u6613\uff0c\u4e5f\u6b22\u8fce\u5927\u5bb6\u70b9\u4e2astar~<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-top: none;border-right: none;border-bottom: none;font-size: 0.9em;overflow: auto;border-left-color: rgb(239, 112, 96);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;background: rgb(255, 249, 249);\">\n<p style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;color: black;line-height: 26px;\">https:\/\/github.com\/trunks2008\/feign-local-enhancer<\/p>\n<\/blockquote>\n<\/section>\n<section powered-by=\"xiumi.us\" style=\"outline: 0px;letter-spacing: 0.544px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);\">\n<section style=\"margin-bottom: 10px;outline: 0px;display: flex;flex-flow: row nowrap;transform: translate3d(0px, 0px, 1px) rotateY(180deg);\">\n<section style=\"outline: 0px;display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 0%;line-height: 0;height: auto;\">\n<section powered-by=\"xiumi.us\" style=\"outline: 0px;text-align: right;transform: translate3d(-3px, 0px, 1px) rotateY(180deg);justify-content: flex-end;\">\n    <br \/>\n   <\/section>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\" style=\"margin-top: 10px;margin-bottom: 0em;outline: 0px;letter-spacing: 0.544px;color: rgb(0, 0, 0);font-size: 16px;text-align: left;font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;background-color: rgb(255, 255, 255);\">\n<section style=\"padding-right: 10px;padding-left: 10px;outline: 0px;text-align: center;font-size: 14px;color: rgb(96, 178, 154);letter-spacing: 1px;line-height: 1.6;\">\n<pre style=\"outline: 0px;letter-spacing: 0.544px;font-weight: 700;orphans: 4;text-align: left;widows: 1;word-spacing: 1px;caret-color: rgb(255, 0, 0);font-size: 16px;color: rgb(0, 0, 0);\"><pre style=\"outline: 0px;color: rgb(0, 0, 0);font-size: 16px;font-weight: 700;letter-spacing: 0.544px;orphans: 4;text-align: left;widows: 1;word-spacing: 1px;caret-color: rgb(255, 0, 0);background-color: rgb(255, 255, 255);visibility: visible;\"><pre style=\"outline: 0px;letter-spacing: 0.544px;color: rgb(62, 62, 62);caret-color: rgb(60, 60, 60);visibility: visible;\">\n     <section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"padding-right: 10px;padding-left: 10px;outline: 0px;caret-color: rgb(255, 0, 0);white-space: normal;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;letter-spacing: 0px;text-size-adjust: inherit;line-height: 1.6;word-break: break-word;visibility: visible;\">\n      <h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 20px;margin-bottom: 15px;outline: 0px;font-weight: bold;font-size: 1.3em;caret-color: rgb(0, 0, 0);border-bottom: 2px solid rgb(239, 112, 96);text-align: center;visibility: visible;\"><span style=\"margin-right: 3px;padding: 3px 10px 1px;outline: 0px;display: inline-block;background-color: rgb(239, 112, 96);color: rgb(255, 255, 255);border-top-right-radius: 3px;border-top-left-radius: 3px;letter-spacing: 1px;font-size: 20px;visibility: visible;\">\u7a0b\u5e8f\u6c6a\u8d44\u6599\u94fe\u63a5<\/span><\/h2>\n     <\/section>\n     <section data-recommend-title=\"t\" data-recommend-content=\"t\" data-mid=\"\" style=\"outline: 0px;color: rgb(63, 63, 63);letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);white-space: normal;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;text-size-adjust: inherit;line-height: 1.75em;visibility: visible;\">\n      <p style=\"outline: 0px;line-height: 1.75em;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzQ0Njc4Ng==&amp;mid=2247501524&amp;idx=1&amp;sn=2cb28e7b64ab77c55bcc1a172b82a2ad&amp;chksm=903bc2b9a74c4baf5737cd430560ee3c5a357bb37864257a05a72e3cccf41db5bd221ccc63d8&amp;scene=21#wechat_redirect\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" wah-hotarea=\"click\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" >\u7a0b\u5e8f\u6c6a\u63a5\u76847\u4e2a\u79c1\u6d3b\u90fd\u5728\u8fd9\u91cc\uff0c\u7ecf\u9a8c\u6574\u7406<\/a><\/p>\n      <p style=\"outline: 0px;line-height: 1.75em;letter-spacing: 0.544px;text-size-adjust: inherit;word-break: break-word;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg2ODU0NTA2Mw==&amp;mid=2247488419&amp;idx=2&amp;sn=0b80c7f9f73fca89b91e257a269cfada&amp;chksm=ceabf4ebf9dc7dfdaa605a9bb92d31c9fc0a10a7a94351234181a89ba5800672c6e7da2ebfbe&amp;scene=21#wechat_redirect\" textvalue=\"Java\u9879\u76ee\u5206\u4eab  \u6700\u65b0\u6574\u7406\u5168\u96c6\uff0c\u627e\u9879\u76ee\u4e0d\u7d2f\u5566 07\u7248\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" wah-hotarea=\"click\" hasload=\"1\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" ><span style=\"outline: 0px;visibility: visible;\"><strong style=\"outline: 0px;visibility: visible;\">Java\u9879\u76ee\u5206\u4eab &nbsp;\u6700\u65b0\u6574\u7406\u5168\u96c6\uff0c\u627e\u9879\u76ee\u4e0d\u7d2f\u5566 07\u7248<\/strong><strong style=\"outline: 0px;visibility: visible;\"><\/strong><\/span><\/a><br style=\"outline: 0px;visibility: visible;\"><\/p>\n      <p style=\"outline: 0px;line-height: 1.75em;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzQ0Njc4Ng==&amp;mid=2247494170&amp;idx=1&amp;sn=5181a5277946be31478b1b9425c93f63&amp;chksm=903bee77a74c67614b2772248e8b5e912d323bfe42a0e576dd157a4752f5fed88d6b439ec52f&amp;scene=21#wechat_redirect\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" wah-hotarea=\"click\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;letter-spacing: 0.544px;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" ><strong style=\"outline: 0px;visibility: visible;\">\u582a\u79f0\u795e\u7ea7\u7684Spring Boot\u624b\u518c\uff0c\u4ece\u57fa\u7840\u5165\u95e8\u5230\u5b9e\u6218\u8fdb\u9636<\/strong><\/a><\/p>\n      <p style=\"outline: 0px;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzQ0Njc4Ng==&amp;mid=2247492941&amp;idx=1&amp;sn=2ff31fec735d7c5d6f3483c346d5ca69&amp;chksm=903be120a74c68361fd9afad178e7338315041a2cd4459f2165a8faa20e995a3477af3eda2bb&amp;scene=21#wechat_redirect\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" wah-hotarea=\"click\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" ><strong style=\"outline: 0px;visibility: visible;\">\u5367\u69fd\uff01\u5b57\u8282\u8df3\u52a8\u300a\u7b97\u6cd5\u4e2d\u6587\u624b\u518c\u300b\u706b\u4e86\uff0c\u5b8c\u6574\u7248 PDF \u5f00\u653e\u4e0b\u8f7d\uff01<\/strong><\/a><\/p>\n      <p style=\"outline: 0px;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzQ0Njc4Ng==&amp;mid=2247496297&amp;idx=2&amp;sn=d253dda2160821262d9f6fc1a9a637d0&amp;chksm=903bf604a74c7f126ab936e374a1f22b9b7cb26a7964b6cc837c3f73af516139064e522a1294&amp;scene=21#wechat_redirect\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" wah-hotarea=\"click\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" ><strong style=\"outline: 0px;visibility: visible;\">\u5367\u69fd\uff01\u963f\u91cc\u5927\u4f6c\u603b\u7ed3\u7684\u300a\u56fe\u89e3Java\u300b\u706b\u4e86\uff0c\u5b8c\u6574\u7248PDF\u5f00\u653e\u4e0b\u8f7d\uff01<\/strong><\/a><\/p>\n      <p style=\"outline: 0px;visibility: visible;\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzA4NzQ0Njc4Ng==&amp;mid=2247490715&amp;idx=2&amp;sn=7f2c5de11bebaecfbaf1ce4b945a4d6f&amp;chksm=903818f6a74f91e0fde557b75bd44adfd5d378612f682aa3eef6766927aebb9e5afc72c91a9e&amp;scene=21#wechat_redirect\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" hasload=\"1\" wah-hotarea=\"click\" style=\"outline: 0px;color: rgb(0, 128, 255);text-decoration: underline;cursor: pointer;visibility: visible;\" rel=\"noopener\" rel=\"nofollow\" ><strong style=\"outline: 0px;visibility: visible;\">\u5b57\u8282\u8df3\u52a8\u603b\u7ed3\u7684\u8bbe\u8ba1\u6a21\u5f0f PDF \u706b\u4e86\uff0c\u5b8c\u6574\u7248\u5f00\u653e\u4e0b\u8f7d\uff01<\/strong><\/a><\/p>\n      <section class=\"mp_profile_iframe_wrp\" style=\"outline: 0px;visibility: visible;\">\n       <mp-common-profile class=\"js_uneditable js_wx_tap_highlight\" data-pluginname=\"mpprofile\" data-id=\"MzA4NzQ0Njc4Ng==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/obDoO79MTFFj7yxAU4nibk9t37xxUNx4PRy8QKpqibgry1mqiaYu5NLaoAibgHHkCtrKvgoEu6xz63UNQRAGBxF2Mg\/0?wx_fmt=png\" data-nickname=\"\u6211\u662f\u7a0b\u5e8f\u6c6a\" data-alias=\"woshichengxuwang\" data-signature=\"\u6df1\u8015IT\u54a8\u8be2\uff0c10\u5e74\u5f00\u53d1\u8001\u5175\u5e2e\u4f60\u5c11\u8d70\u5f2f\u8def\uff0c\u5206\u4eab\u6211\u7684\u5de5\u4f5c\u548c\u63a5\u79c1\u6d3b\u7ecf\u9a8c\uff0c\u66f4\u5173\u6ce8\u5e95\u5c42\u7801\u519c \u8f6c\u884c\u3001\u57f9\u8bad\u3001\u81ea\u5b66\u7684\u5c0f\u767d\u7a0b\u5e8f\u5458\" data-from=\"2\" data-is_biz_ban=\"0\" has-insert-preloading=\"1\" data-index=\"1\" data-origin_num=\"204\" data-isban=\"0\" data-weui-theme=\"light\" data-biz_account_status=\"0\"><\/mp-common-profile>\n      <\/section>\n     <\/section><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin: 10px;padding-top: 8px;padding-bottom: 8px;outline: 0px;font-weight: 400;orphans: 2;white-space: normal;widows: 2;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;line-height: 1.75;letter-spacing: 0.2em;font-size: 15px;word-spacing: 0.1em;visibility: visible;\"><span style=\"outline: 0px;color: rgb(122, 79, 214);font-variant-ligatures: common-ligatures;font-weight: 700;letter-spacing: 0.544px;orphans: 4;widows: 1;word-spacing: 1px;visibility: visible;\">\u6b22\u8fce\u6dfb\u52a0\u7a0b\u5e8f\u6c6a\u4e2a\u4eba\u5fae\u4fe1 itwang007&nbsp; \u8fdb\u7c89\u4e1d\u7fa4\u6216\u56f4\u89c2\u670b\u53cb\u5708<\/span><\/p>\n<\/section>\n<\/section>\n<p style=\"display: none;\">\n <mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff1ahttps:\/\/mp.weixin.qq.com\/s\/2XSCNTb3btgvhdbHz92cMQ<\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5728\u5e73\u5e38\u7684\u5de5\u4f5c\u4e2d\uff0cOpenFeign\u4f5c\u4e3a\u5fae\u670d\u52a1\u95f4\u7684\u8c03\u7528\u7ec4\u4ef6\u4f7f\u7528\u7684\u975e\u5e38\u666e\u904d\uff0c\u63a5\u53e3\u914d\u5408\u6ce8\u89e3\u7684\u8c03\u7528\u65b9\u5f0f\u7a81\u51fa\u4e00\u4e2a\u7b80\u4fbf\uff0c\u8ba9\u6211\u4eec\u80fd\u65e0\u9700\u5173\u6ce8\u5185\u90e8\u7ec6 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-2969","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-10\/20230714172510fcfc6918e.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725117c7c1382d.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725117c7c1382d.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725110808bb88b.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/202307141725110808bb88b.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/20230714172511cfcf0fc26.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/20230714172511cfcf0fc26.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/2023071417251159597039a.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-11\/2023071417251159597039a.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512f7f78eb47.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512f7f78eb47.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512b9b9d1b3e.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-12\/20230714172512b9b9d1b3e.png","id":"image13"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513707034025.png","id":"image14"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513707034025.png","id":"image15"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513b9b95f8cd.png","id":"image16"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-25-13\/20230714172513b9b95f8cd.png","id":"image17"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"\u672a\u5206\u7c7b","post_date":"2023-07-14","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":277,"next_post_id":2981,"next_post_title":"\u5206\u4eab\u514d\u8d39api\u63a5\u53e3","previous_post_id":2431,"previous_post_title":"\u75c5\u6bd2\u7684\u67e5\u6740\u6b65\u9aa4","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2969"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2969\/revisions"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}