{"id":95,"date":"2024-01-02T15:18:11","date_gmt":"2024-01-02T07:18:11","guid":{"rendered":"https:\/\/hjwzs.xyz\/?p=95"},"modified":"2024-01-02T16:05:34","modified_gmt":"2024-01-02T08:05:34","slug":"%e7%bf%bb%e8%af%91-%e9%87%8d%e6%9e%84-01","status":"publish","type":"post","link":"https:\/\/hjwzs.xyz\/?p=95","title":{"rendered":"\u91cd\u6784 01\uff1a\u524d\u8a00"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><blockquote>\n<p>Translated from\uff1a<a href=\"https:\/\/refactoringguru.cn\/refactoring\">Refactoring<\/a><\/p>\n<\/blockquote>\n<\/div>\n\n\n\n<p>\u91cd\u6784\u662f\u4e00\u4e2a\u7cfb\u7edf\u5316\u7684\u8fc7\u7a0b\uff0c\u5728\u4e0d\u521b\u5efa\u65b0\u529f\u80fd\u7684\u60c5\u51b5\u4e0b\u6539\u8fdb\u4ee3\u7801\uff0c\u53ef\u4ee5\u5c06\u4e00\u56e2\u7cdf\u7684\u4ee3\u7801\u8f6c\u5316\u4e3a\u5e72\u51c0\u7684\u4ee3\u7801\u548c\u7b80\u5355\u7684\u8bbe\u8ba1\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u91cd\u6784\u5de5\u4f5c\u5305\u542b\uff1a\u7b80\u5316\u4ee3\u7801<\/h2>\n\n\n\n<p>\u91cd\u6784\u7684\u4e3b\u8981\u76ee\u7684\u662f\u5bf9\u6297\u6280\u672f\u503a\u52a1\u3002\u5b83\u5c06\u4e00\u56e2\u4e71\u9ebb\u8f6c\u5316\u4e3a\u5e72\u51c0\u7684\u4ee3\u7801\u548c\u7b80\u5355\u7684\u8bbe\u8ba1\u3002<\/p>\n\n\n\n<p>\u5f88\u597d\uff01\u4f46\u4ec0\u4e48\u662f<strong>\u5e72\u51c0\u7684\u4ee3\u7801<\/strong>\u5462\uff1f\u4e0b\u9762\u662f\u5b83\u7684\u4e00\u4e9b\u7279\u70b9\u3002<\/p>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p><strong>1. \u5e72\u51c0\u7684\u4ee3\u7801\u5bf9\u4e8e\u5176\u4ed6\u7a0b\u5e8f\u5458\u6765\u8bf4\u662f\u663e\u800c\u6613\u89c1\u7684\u3002<\/strong><\/p>\n<p>\u8fd9\u91cc\u8bf4\u7684\u4e0d\u662f\u8d85\u7ea7\u590d\u6742\u7684\u7b97\u6cd5\u3002\u7cdf\u7cd5\u7684\u53d8\u91cf\u547d\u540d\uff0c\u81c3\u80bf\u7684\u7c7b\u548c\u65b9\u6cd5\uff0c\u795e\u5947\u7684\u6570\u5b57\u2013\u4f60\u80fd\u60f3\u5230\u7684\u2013\u6240\u6709\u8fd9\u4e9b\u90fd\u4f1a\u8ba9\u4ee3\u7801\u53d8\u5f97\u6df7\u4e71\u548c\u96be\u4ee5\u63a7\u5236\u3002<\/p>\n<p><strong>2. \u5e72\u51c0\u7684\u4ee3\u7801\u4e0d\u5305\u542b\u91cd\u590d\u7684\u5185\u5bb9\u3002<\/strong><\/p>\n<p>\u6bcf\u6b21\u8981\u5bf9\u91cd\u590d\u7684\u4ee3\u7801\u8fdb\u884c\u4fee\u6539\u65f6\uff0c\u90fd\u8981\u8bb0\u5f97\u5bf9\u6bcf\u4e2a\u76f8\u540c\u7684\u90e8\u5206\u8fdb\u884c\u540c\u6837\u7684\u4fee\u6539\u3002\u8fd9\u589e\u52a0\u4e86\u8bb0\u5fc6\u8d1f\u62c5\uff0c\u540c\u65f6\u4e5f\u51cf\u7f13\u4e86\u5f00\u53d1\u8fdb\u5ea6\u3002\uff08\u8bd1\u8005\uff1a\u4ee3\u7801\u8d28\u91cf\u4e5f\u5f88\u582a\u5fe7\uff09<\/p>\n<p><strong>3.  \u5e72\u51c0\u7684\u4ee3\u7801\u5305\u542b\u4e86\u6700\u5c11\u6570\u91cf\u7684\u7c7b\u548c\u5176\u4ed6\u53ef\u79fb\u690d\u7684\u7ec4\u4ef6\u3002<\/strong><\/p>\n<p>\u4ee3\u7801\u5c11\u4e86\uff0c\u8111\u5b50\u91cc\u8981\u88c5\u7684\u4e1c\u897f\u5c31\u5c11\u4e86\u3002\u66f4\u5c11\u7684\u4ee3\u7801\u5c31\u662f\u66f4\u5c11\u7684\u7ef4\u62a4\u3002\u4ee3\u7801\u5c11\u5c31\u662fbug\u5c11\u3002\u4ee3\u7801\u5c31\u662f\u8d1f\u62c5\uff0c\u8981\u77ed\u5c0f\u7cbe\u608d\u3002<\/p>\n<p><strong>4.  \u5e72\u51c0\u7684\u4ee3\u7801\u901a\u8fc7\u6240\u6709\u6d4b\u8bd5\u3002<\/strong><\/p>\n<p>\u5f53\u4f60\u7684\u6d4b\u8bd5\u53ea\u670995%\u901a\u8fc7\u65f6\uff0c\u4f60\u5c31\u77e5\u9053\u4f60\u7684\u4ee3\u7801\u5f88\u810f\u3002\u5f53\u4f60\u7684\u6d4b\u8bd5\u8986\u76d6\u7387\u4e3a0%\u7684\u65f6\u5019\uff0c\u4f60\u5c31\u77e5\u9053\u4f60\u5b8c\u86cb\u4e86\u3002<\/p>\n<p><strong>5. \u5e72\u51c0\u7684\u4ee3\u7801\u66f4\u5bb9\u6613\u7ef4\u62a4\uff0c\u6210\u672c\u66f4\u4f4e!<\/strong><\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u91cd\u6784\u5de5\u4f5c\u5305\u542b\uff1a\u89e3\u51b3\u6280\u672f\u6027\u503a\u52a1<\/h2>\n\n\n\n<p>\u6bcf\u4e2a\u4eba\u90fd\u4f1a\u5c3d\u81ea\u5df1\u6700\u5927\u7684\u52aa\u529b\uff0c\u4ece\u96f6\u5f00\u59cb\u5199\u51fa\u4f18\u79c0\u7684\u4ee3\u7801\u3002\u53ef\u80fd\u6ca1\u6709\u4e00\u4e2a\u7a0b\u5e8f\u5458\u4f1a\u6545\u610f\u5199\u51fa\u4e0d\u5e72\u51c0\u7684\u4ee3\u7801\u6765\u635f\u5bb3\u9879\u76ee\u3002\u4f46\u662f\uff0c\u5e72\u51c0\u7684\u4ee3\u7801\u5728\u4ec0\u4e48\u65f6\u5019\u4f1a\u53d8\u5f97\u4e0d\u5e72\u51c0\u5462\uff1f<\/p>\n\n\n\n<p>\u5173\u4e8e\u4e0d\u5e72\u51c0\u4ee3\u7801\u7684 &#8220;\u6280\u672f\u503a\u52a1 &#8220;\u7684\u6bd4\u55bb\u6700\u521d\u662f\u7531 Ward Cunningham \u63d0\u51fa\u7684\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u4ece\u94f6\u884c\u83b7\u5f97\u8d37\u6b3e\uff0c\u8fd9\u53ef\u4ee5\u8ba9\u4f60\u66f4\u6109\u5feb\u7684\u8fdb\u884c\u8d2d\u7269\u3002\u5f53\u7136\uff0c\u4f60\u8981\u4ed8\u51fa\u989d\u5916\u7684\u4ee3\u4ef7&#8211;\u4e0d\u4ec5\u8981\u507f\u8fd8\u672c\u91d1\uff0c\u8fd8\u8981\u507f\u8fd8\u8d37\u6b3e\u7684\u989d\u5916\u5229\u606f\u3002\u6700\u7ec8\uff0c\u4f60\u751a\u81f3\u53ef\u4ee5\u79ef\u7d2f\u832b\u832b\u591a\u7684\u5229\u606f\uff0c\u4ee5\u81f3\u4e8e\u5229\u606f\u91d1\u989d\u8d85\u8fc7\u4e86\u4f60\u7684\u603b\u6536\u5165\uff0c\u8ba9\u4f60\u65e0\u6cd5\u5168\u989d\u8fd8\u6b3e\u3002<\/p>\n\n\n\n<p>\u540c\u6837\u7684\u4e8b\u60c5\u4e5f\u4f1a\u53d1\u751f\u5728\u4ee3\u7801\u4e0a\u3002\u4f60\u53ef\u4ee5\u6682\u65f6\u4e0d\u4e3a\u65b0\u529f\u80fd\u5199\u6d4b\u8bd5\u800c\u52a0\u5feb\u8fdb\u5ea6\uff0c\u4f46\u8fd9\u5c06\u4f7f\u4f60\u6bcf\u5929\u7684\u8fdb\u5ea6\u9010\u6e10\u53d8\u6162\uff0c\u76f4\u5230\u4f60\u6700\u7ec8\u901a\u8fc7\u5199\u6d4b\u8bd5\u6765\u8fd8\u6e05\u503a\u52a1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6280\u672f\u6027\u503a\u52a1\u7684\u539f\u56e0<\/h3>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p><strong>1. \u4e1a\u52a1\u538b\u529b<\/strong><\/p>\n<p>\u6709\u65f6\uff0c\u4e1a\u52a1\u65b9\u53ef\u80fd\u4f1a\u8feb\u4f7f\u4f60\u5728\u529f\u80fd\u5b8c\u5168\u5b8c\u6210\u4e4b\u524d\u5c31\u5c06\u5176\u53d1\u5e03\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e3a\u4e86\u63a9\u76d6\u672a\u5b8c\u6210\u7684\u529f\u80fd\uff0c\u4ee3\u7801\u4e2d\u4f1a\u5145\u65a5\u7740\u8865\u4e01\u548c\u4e0d\u6210\u719f\u7684\u4ee3\u7801\u3002<\/p>\n<p><strong>2. \u5bf9\u6280\u672f\u6027\u503a\u52a1\u7684\u540e\u679c\u7f3a\u4e4f\u4e86\u89e3\u3002<\/strong><\/p>\n<p>\u6709\u65f6\uff0c\u4f60\u7684\u8001\u677f\u53ef\u80fd\u4e0d\u7406\u89e3\u6280\u672f\u503a\u52a1\u6709 \u201c\u5229\u606f\u201d\uff0c\u56e0\u4e3a\u968f\u7740\u503a\u52a1\u7684\u79ef\u7d2f\uff0c\u5b83\u4f1a\u51cf\u7f13\u5f00\u53d1\u7684\u901f\u5ea6\u3002\u8fd9\u53ef\u80fd\u4f1a\u4f7f\u56e2\u961f\u5f88\u96be\u5c06\u65f6\u95f4\u7528\u4e8e\u91cd\u6784\uff0c\u56e0\u4e3a\u7ba1\u7406\u5c42\u6ca1\u6709\u770b\u5230\u5b83\u7684\u4ef7\u503c\u3002<\/p>\n<p><strong>3. \u7ec4\u4ef6\u4e25\u91cd\u8026\u5408\u3002<\/strong><\/p>\n<p>\u5f53\u9879\u76ee\u7c7b\u4f3c\u4e8e\u6574\u4f53\u800c\u4e0d\u662f\u5355\u4e2a\u6a21\u5757\u7684\u4ea7\u54c1\u65f6\u3002 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5bf9\u9879\u76ee\u67d0\u4e00\u90e8\u5206\u7684\u4efb\u4f55\u66f4\u6539\u90fd\u4f1a\u5f71\u54cd\u5176\u4ed6\u90e8\u5206\u3002 \u56e2\u961f\u5f00\u53d1\u53d8\u5f97\u66f4\u52a0\u56f0\u96be\uff0c\u56e0\u4e3a\u5f00\u53d1\u5de5\u4f5c\u90fd\u5c06\u8026\u5408\u5728\u4e00\u8d77\uff0c\u53ef\u80fd\u90fd\u65e0\u6cd5\u8fdb\u884c\u72ec\u7acb\u7684\u5f00\u53d1\u3002<\/p>\n<p><strong>4. \u7f3a\u4e4f\u6d4b\u8bd5\u3002<\/strong><\/p>\n<p>\u7f3a\u4e4f\u53ca\u65f6\u6d4b\u8bd5\u7684\u4ee3\u7801\u867d\u7136\u901f\u5ea6\u5feb\uff0c\u4f46\u662f\u5bf9\u9879\u76ee\u5145\u6ee1\u4e86\u98ce\u9669\u548c\u95ee\u9898\u3002\u5728\u6700\u7cdf\u7cd5\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e9b\u6539\u52a8\u5728\u6ca1\u6709\u4efb\u4f55\u4e8b\u5148\u6d4b\u8bd5\u7684\u60c5\u51b5\u4e0b\u5c31\u88ab\u90e8\u7f72\u548c\u8fd0\u884c\u5230\u751f\u4ea7\u4e2d\u3002\u5176\u540e\u679c\u53ef\u80fd\u662f\u707e\u96be\u6027\u7684\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u770b\u4f3c\u65e0\u5bb3\u7684\u70ed\u4fee\u590d\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u5411\u6210\u5343\u4e0a\u4e07\u7684\u5ba2\u6237\u53d1\u9001\u4e00\u5c01\u5947\u602a\u7684\u6d4b\u8bd5\u7535\u5b50\u90ae\u4ef6\u3002\u751a\u81f3\u66f4\u574f\u7684\u60c5\u51b5\uff0c\u7f3a\u9677\u4f1a\u91cd\u7f6e\u6216\u7834\u574f\u6574\u4e2a\u6570\u636e\u5e93\u3002<\/p>\n<p><strong>5. \u7f3a\u4e4f\u6587\u6863\u3002<\/strong><\/p>\n<p>\u8fd9\u5c31\u51cf\u7f13\u4e86\u9879\u76ee\u5f15\u8fdb\u65b0\u4eba\u7684\u901f\u5ea6\uff0c\u5982\u679c\u5173\u952e\u5f00\u53d1\u4eba\u5458\u79bb\u5f00\uff0c\u5c31\u4f1a\u4f7f\u9879\u76ee\u53d1\u5c55\u505c\u6ede\u4e0d\u524d\u3002<\/p>\n<p><strong>6. \u56e2\u961f\u6210\u5458\u4e4b\u95f4\u7f3a\u4e4f\u4e92\u52a8\u3002<\/strong><\/p>\n<p>\u5982\u679c\u77e5\u8bc6\u5e93\u6ca1\u6709\u5728\u6574\u4e2a\u516c\u53f8\u5e7f\u6cdb\u8fd0\u7528\uff0c\u4eba\u6c11\u6700\u7ec8\u4f1a\u5728\u5bf9\u9879\u76ee\u7684\u6d41\u7a0b\u548c\u4fe1\u606f\u7684\u7406\u89e3\u4e0a\u56e0\u4fe1\u606f\u4e0d\u540c\u6b65\u5bfc\u81f4\u95ee\u9898\u53d1\u751f\u3002\u5982\u679c\u521d\u7ea7\u5f00\u53d1\u4eba\u5458\u6ca1\u6709\u5f97\u5230\u5bfc\u5e08\u7684\u6b63\u786e\u57f9\u8bad\uff0c\u8fd9\u79cd\u60c5\u51b5\u4f1a\u66f4\u52a0\u4e25\u91cd\u3002<\/p>\n<p><strong>7. \u5728\u957f\u5206\u652f\u4e0a\u6301\u7eed\u5f00\u53d1\u3002<\/strong><\/p>\n<p>\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6280\u672f\u503a\u52a1\u7684\u79ef\u7d2f\uff0c\u5f53\u5206\u652f\u5408\u5e76\u65f6\uff0c\u6280\u672f\u503a\u52a1\u5c31\u4f1a\u589e\u52a0\u3002\u5728\u4e00\u6839\u5206\u652f\u4e0a\u5355\u72ec\u63d0\u4ea4\u7684\u4ee3\u7801\u8d8a\u591a\uff0c\u5408\u5e76\u65f6\u4ea7\u751f\u7684\u6280\u672f\u503a\u52a1\u603b\u989d\u5c31\u8d8a\u5927\u3002<\/p>\n<p><strong>8. \u4e0d\u65ad\u63a8\u8fdf\u91cd\u6784\u7684\u65f6\u95f4\u3002<\/strong><\/p>\n<p>\u9879\u76ee\u7684\u9700\u6c42\u662f\u4e0d\u65ad\u53d8\u5316\u7684\uff0c\u5728\u67d0\u4e9b\u65f6\u5019\uff0c\u53ef\u80fd\u4f1a\u53d1\u73b0\u90e8\u5206\u4ee3\u7801\u5df2\u7ecf\u8fc7\u65f6\uff0c\u5df2\u7ecf\u53d8\u5f97\u5f88\u7e41\u7410\uff0c\u5fc5\u987b\u91cd\u65b0\u8bbe\u8ba1\u4ee5\u6ee1\u8db3\u65b0\u7684\u9700\u6c42\u3002<\/p>\n<p>\u53e6\u4e00\u65b9\u9762\uff0c\u9879\u76ee\u7684\u7a0b\u5e8f\u5458\u6bcf\u5929\u90fd\u5728\u8fc7\u65f6\u7684\u90e8\u5206\u4e2d\u4e0d\u65ad\u7f16\u5199\u65b0\u7684\u4ee3\u7801\u3002\u56e0\u6b64\uff0c\u91cd\u6784\u7684\u65f6\u95f4\u62d6\u5f97\u8d8a\u957f\uff0c\u5c06\u6765\u9700\u8981\u91cd\u6784\u7684\u4ee3\u7801\u4f9d\u8d56\u5c31\u8d8a\u591a\u3002\uff08\u8bd1\u8005\u6ce8\uff1a\u5927\u6982\u662f\u6307\u6570\u7ea7\u5427\uff09<\/p>\n<p><strong>9. \u6ca1\u6709\u9075\u5faa\u7684\u7f16\u7801\u89c4\u8303\u3002<\/strong><\/p>\n<p>\u5f53\u6bcf\u4e2a\u5728\u9879\u76ee\u4e2d\u5de5\u4f5c\u7684\u4eba\u90fd\u6309\u7167\u81ea\u5df1\u8ba4\u4e3a\u5408\u9002\u7684\u65b9\u5f0f\u5199\u4ee3\u7801\u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n<p><strong>10. \u80fd\u529b\u95ee\u9898\u3002<\/strong><\/p>\n<p>\u53c2\u4e0e\u7684\u5f00\u53d1 too simple too naive\uff0c\u5b8c\u5168\u4e0d\u77e5\u9053\u600e\u4e48\u5199\u4ee3\u7801\u3002<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u91cd\u6784\u7684\u65f6\u673a<\/h2>\n\n\n\n<p><strong>\u201c\u4e09\u6b21\u201d\u5b9a\u5f8b&#8230;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5f53\u4f60\u5199\u7b2c\u4e00\u6b21\u4ee3\u7801\u65f6\uff0c\u76f4\u63a5\u5199\u5c31\u662f\u4e86\u3002<\/li>\n\n\n\n<li>\u5f53\u4f60\u5199\u7b2c\u4e8c\u904d\uff0c\u53d1\u73b0\u4ee3\u7801\u6709\u70b9\u76f8\u4f3c\uff0c\u4ecd\u7136\u53ef\u4ee5\u76f4\u63a5\u5199\u3002<\/li>\n\n\n\n<li>\u540c\u6837\u7684\u903b\u8f91\u5199\u7b2c\u4e09\u6b21\u662f\uff0c\u53ef\u4ee5\u5f00\u59cb\u91cd\u6784\u4e86\uff01<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/img.hjwzs.xyz\/images\/2024\/01\/02\/ITbs.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p><strong>\u5f53\u6dfb\u52a0\u529f\u80fd\u65f6&#8230;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u91cd\u6784\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7406\u89e3\u522b\u4eba\u7684\u4ee3\u7801\u3002\u5982\u679c\u4f60\u4e0d\u5f97\u4e0d\u5904\u7406\u522b\u4eba\u7684\u810f\u4ee3\u7801\uff0c\u8bd5\u7740\u5148\u91cd\u6784\u4e00\u4e0b\u3002\u5e72\u51c0\u7684\u4ee3\u7801\u66f4\u6e05\u6670\u6613\u61c2\uff0c\u540c\u65f6\uff0c\u8d60\u4eba\u73ab\u7470\uff0c\u624b\u6709\u4f59\u9999\u3002<\/li>\n\n\n\n<li>\u91cd\u6784\u8ba9\u4f60\u66f4\u5bb9\u6613\u6dfb\u52a0\u65b0\u529f\u80fd\u3002\u5728\u5e72\u51c0\u7684\u4ee3\u7801\u4e2d\u8fdb\u884c\u4fee\u6539\u8981\u5bb9\u6613\u5f97\u591a\u3002<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/img.hjwzs.xyz\/images\/2024\/01\/02\/IgF8.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p><strong>\u5f53\u4fee\u590d\u7f3a\u9677\u65f6&#8230;<\/strong><\/p>\n\n\n\n<p>\u4ee3\u7801\u4e2d\u7684bug\u5c31\u50cf\u73b0\u5b9e\u751f\u6d3b\u4e2d\u7684\u87d1\u8782\u4e00\u6837\uff1a\u5b83\u4eec\u751f\u6d3b\u5728\u4ee3\u7801\u4e2d\u6700\u9ed1\u6697\u3001\u6700\u80ae\u810f\u7684\u5730\u65b9\u3002\u6e05\u7406\u4f60\u7684\u4ee3\u7801\uff0cbug\u5c31\u4f1a\u81ea\u5df1\u8dd1\u51fa\u6765\u3002<\/p>\n\n\n\n<p>\u8001\u677f\u4eec\u5f88\u6b23\u8d4f\u627f\u62c5\u4e3b\u52a8\u91cd\u6784\u4efb\u52a1\u7684\u5f00\u53d1\u4eba\u5458\uff0c\u56e0\u4e3a\u5b83\u7701\u53bb\u4e86\u4ee5\u540e\u4e13\u95e8\u5b89\u6392\u4eba\u529b\u7684\u91cd\u6784\u4efb\u52a1\u3002Happy bosses make happy programmers!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/img.hjwzs.xyz\/images\/2024\/01\/02\/Ih5V.png\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p><strong>\u5f53\u4ee3\u7801\u5ba1\u67e5\u65f6&#8230;<\/strong><\/p>\n\n\n\n<p>\u4ee3\u7801\u5ba1\u67e5\u53ef\u80fd\u662f\u53d1\u5e03\u4e4b\u524d\u6574\u7406\u4ee3\u7801\u7684\u6700\u540e\u673a\u4f1a\u3002\u6700\u597d\u4e0e\u539f\u4f5c\u8005\u7ed3\u4f34\u8fdb\u884c\u8fd9\u79cd\u5ba1\u67e5\u3002\u8fd9\u6837\u4f60\u53ef\u4ee5\u5feb\u901f\u4fee\u590d\u7b80\u5355\u7684\u95ee\u9898\uff0c\u5e76\u8bc4\u4f30\u4fee\u590d\u8f83\u96be\u95ee\u9898\u7684\u65f6\u95f4\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5982\u4f55\u8fdb\u884c\u91cd\u6784<\/h2>\n\n\n\n<p>\u91cd\u6784\u5e94\u8be5\u5c0f\u6b65\u5feb\u8fdb\uff0c\u6bcf\u4e00\u4e2a\u6539\u52a8\u90fd\u4f1a\u8ba9\u73b0\u6709\u7684\u4ee3\u7801\u53d8\u5f97\u7a0d\u5fae\u597d\u4e00\u70b9\uff0c\u540c\u65f6\u8fd8\u80fd\u8ba9\u7a0b\u5e8f\u4fdd\u6301\u5de5\u4f5c\u72b6\u6001\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7528\u6b63\u786e\u7684\u65b9\u5f0f\u8fdb\u884c\u91cd\u6784\u7684\u68c0\u67e5\u8868<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u221a  \u4ee3\u7801\u5e94\u5f53\u8d8a\u6765\u8d8a\u7b80\u6d01<\/strong><\/h4>\n\n\n\n<p>\u5982\u679c\u91cd\u6784\u540e\u4ee3\u7801\u4ecd\u7136\u4e0d\u5e72\u51c0&#8230; \u62b1\u6b49\uff0c\u4f46\u4f60\u521a\u521a\u53ef\u80fd\u6d6a\u8d39\u4e86\u4e00\u4e2a\u5c0f\u65f6\u7684\u65f6\u95f4\u3002\u8bd5\u7740\u627e\u51fa\u4e3a\u4ec0\u4e48\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n\n\n\n<p>\u5f53\u4f60\u5408\u5e76\u4e00\u5806\u91cd\u6784\u5bfc\u81f4\u7684\u5c0f\u4fee\u6539\u70b9\u65f6\uff0c\u7ecf\u5e38\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002\u5f53\u4f60\u5f00\u53d1\u538b\u529b\u975e\u5e38\u5927\u65f6\uff0c\u4f1a\u611f\u5230\u6293\u72c2\u3002<\/p>\n\n\n\n<p>\u4f46\u5728\u5904\u7406\u6781\u5ea6\u8349\u7387\u7684\u4ee3\u7801\u65f6\uff0c\u4e5f\u4f1a\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u3002\u65e0\u8bba\u4f60\u5982\u4f55\u6539\u8fdb\uff0c\u4ee3\u7801\u6574\u4f53\u4e0a\u4ecd\u7136\u662f\u4e00\u573a\u707e\u96be\u3002\uff08\u8bd1\u8005\u6ce8\uff1a\u5c4e\u5c71\u65e0\u8bba\u600e\u4e48\u6574\u7406\u7ec8\u7a76\u8fd8\u662f\u5c4e\u5c71\u3002\uff09<\/p>\n\n\n\n<p>\u8fd9\u662f\u4f60\u5e94\u8be5\u8003\u8651\u5f7b\u5e95\u91cd\u5199\u8fd9\u90e8\u5206\u4ee3\u7801\u3002\u4f46\u5728\u8fd9\u4e4b\u524d\uff0c\u4f60\u5e94\u8be5\u5df2\u7ecf\u5199\u597d\u4e86\u6d4b\u8bd5\uff0c\u5e76\u9884\u7559\u4e00\u5927\u5757\u5f00\u53d1\u65f6\u95f4\u3002\u5426\u5219\uff0c\u4f60\u8fd8\u662f\u4f1a\u56de\u5230\u7b2c\u4e00\u6bb5\u7684\u60c5\u5f62\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u221a \u4e0d\u5e94\u8be5\u5728\u91cd\u6784\u8fc7\u7a0b\u4e2d\u6dfb\u52a0\u65b0\u529f\u80fd<\/strong><\/h4>\n\n\n\n<p>\u4e0d\u8981\u628a\u91cd\u6784\u548c\u65b0\u529f\u80fd\u7684\u76f4\u63a5\u5f00\u53d1\u6df7\u5408\u5728\u4e00\u8d77\u3002\u5c06\u8fd9\u4e9b\u8fc7\u7a0b\u5206\u5f00\uff0c\u4e0d\u8981\u540c\u65f6\u5728\u4e00\u4e2acommit\u91cc\u9762\u65e2\u5305\u542b\u91cd\u6784\u7684\u4ee3\u7801\u53c8\u5305\u542b\u65b0\u529f\u80fd\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u221a \u91cd\u6784\u540e\u6240\u6709\u73b0\u6709\u7684\u6d4b\u8bd5\u90fd\u5fc5\u987b\u901a\u8fc7\u3002<\/strong><\/h4>\n\n\n\n<p>\u6709\u4e24\u79cd\u60c5\u51b5\u4e0b\uff0c\u91cd\u6784\u540e\u7684\u6d4b\u8bd5\u7528\u4f8b\u4f1a\u5d29\u574f\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u4f60\u5728\u91cd\u6784\u8fc7\u7a0b\u4e2d\u72af\u4e86\u9519\u8bef\u3002<\/strong> \u8fd9\u4e2a\u5c31\u4e0d\u591a\u8bf4\u4e86\uff1a\u7ee7\u7eed\u4fee\u6b63\u9519\u8bef\u3002<\/li>\n\n\n\n<li><strong>\u4f60\u7684\u6d4b\u8bd5\u7528\u4f8b\u592a\u5dee\u4e86\u3002<\/strong> \u4f8b\u5982\uff0c\u4f60\u5728\u6d4b\u8bd5\u7c7b\u7684\u79c1\u6709\u65b9\u6cd5\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6d4b\u8bd5\u662f\u7f6a\u9b41\u7978\u9996\u3002\u4f60\u53ef\u4ee5\u91cd\u6784\u6d4b\u8bd5\u672c\u8eab\uff0c\u6216\u8005\u7f16\u5199\u4e00\u5957\u5168\u65b0\u7684\u66f4\u597d\u7684\u6d4b\u8bd5\u3002\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u7684\u4e00\u4e2a\u597d\u529e\u6cd5\u5c31\u662f\u7f16\u5199<a href=\"https:\/\/refactoringguru.cn\/refactoring\/bdd\">\u884c\u4e3a\u9a71\u52a8\u5f00\u53d1BDD\u5f0f<\/a>\u7684\u6d4b\u8bd5\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u91cd\u6784\u662f\u4e00\u4e2a\u7cfb\u7edf\u5316\u7684\u8fc7\u7a0b\uff0c\u5728\u4e0d\u521b\u5efa\u65b0\u529f\u80fd\u7684\u60c5\u51b5\u4e0b\u6539\u8fdb\u4ee3\u7801\uff0c\u53ef\u4ee5\u5c06\u4e00\u56e2\u7cdf\u7684\u4ee3\u7801\u8f6c\u5316\u4e3a\u5e72\u51c0\u7684\u4ee3\u7801\u548c\u7b80\u5355\u7684\u8bbe\u8ba1\u3002 \u91cd\u6784 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[8],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-translated","tag-refactoring"],"_links":{"self":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":34,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}