{"id":275478,"date":"2021-01-12T00:13:29","date_gmt":"2021-01-11T16:13:29","guid":{"rendered":"http:\/\/4563.org\/?p=275478"},"modified":"2021-01-12T00:13:29","modified_gmt":"2021-01-11T16:13:29","slug":"%e8%af%a1%e5%bc%82%e7%9a%84%e9%a1%b9%e7%9b%ae%e5%bc%80%e5%8f%91%e6%97%b6%e7%83%ad%e5%8a%a0%e8%bd%bd%e4%b8%a2%e5%a4%b1%e7%bc%96%e8%af%91%e7%9a%84%e7%b1%bb%e6%96%87%e4%bb%b6%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=275478","title":{"rendered":"\u8be1\u5f02\u7684\u9879\u76ee\u5f00\u53d1\u65f6\u70ed\u52a0\u8f7d\u4e22\u5931\u7f16\u8bd1\u7684\u7c7b\u6587\u4ef6\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8be1\u5f02\u7684\u9879\u76ee\u5f00\u53d1\u65f6\u70ed\u52a0\u8f7d\u4e22\u5931\u7f16\u8bd1\u7684\u7c7b\u6587\u4ef6\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abcbuzhiming <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211\u4eec\u7684\u9879\u76ee\u7ec4\u4f7f\u7528\u4e86 spring-boot-devtools\uff0c\u5f00\u53d1 IDE \u662f IDEA \u7684\u793e\u533a\u7248\uff0c\u793e\u533a\u7248\u5e76\u4e0d\u5177\u5907\u5546\u4e1a\u7248\u7684\u81ea\u52a8 update \u70ed\u52a0\u8f7d\u65b9\u6848\u3002\u6240\u4ee5\u6211\u4eec\u4ee5\u524d\u7684\u5de5\u4f5c\u6d41\u662f\uff1a\u4fee\u6539\u67d0\u4e2a class\u2014\u2014\u4fdd\u5b58\u2014\u2014\u9009\u83dc\u5355\uff0cbuild\u2014\u2014build \u8fd9\u4e2a class\uff0c\u56e0\u4e3a build \u8fc7\u7a0b\u4e2d\u4f1a\u89e6\u53d1 class \u6587\u4ef6\u66f4\u65b0\u88ab spring-boot-devtools \u6355\u6349\u5230\uff0c\u5c31\u4f1a\u5b8c\u6210\u70ed\u52a0\u8f7d\u8fc7\u7a0b\u3002\u8fd9\u4e2a\u65b9\u6848\u4e00\u76f4\u5de5\u4f5c\u7684\u5f88\u597d\u3002<\/p>\n<p>\u77e5\u9053\u4eca\u5929\u540c\u4e8b\u53cd\u6620\uff0c\u6709\u4e00\u4e2a\u6a21\u5757 A\uff0c\u6709\u4e9b\u5947\u602a\uff0c\u4fee\u6539\u4e86 Controller\uff0c\u89e6\u53d1\u70ed\u91cd\u8f7d\uff0c\u7136\u540e\u8fd9\u4e2a Controller \u4e0b\u7684\u6240\u6709 api \u8def\u5f84\u5168\u90e8\u5c31 404 \u4e86\uff0c\u53ea\u80fd\u505c\u6b62\u5e76\u91cd\u542f\u624d\u80fd\u6b63\u5e38\u3002\u6211\u5f88\u5947\u602a\u4e8e\u662f\u7814\u7a76\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u662f\u8fd9\u4e2a\u88ab\u4fee\u6539\u7684 Controller \u5e76\u6ca1\u6709\u5728\u70ed\u91cd\u8f7d\u65f6\u88ab\u8f7d\u5165\uff0c\u4e5f\u5c31\u662f\u8fd9\u4e2a class\u201c\u88ab\u4e22\u5931\u4e86\u201d\u3002\u8fdb\u4e00\u6b65\u53d1\u73b0\u8fd9\u4e2a\u95ee\u9898\u5728\u6240\u6709\u4eba\u7684 IDE \u4e0a\u90fd\u4f1a\u590d\u73b0\uff0c\u6bcf\u6b21\u90fd\u4e00\u5b9a\u51fa\u73b0\u3002<\/p>\n<p>\u6211\u5c31\u89c9\u5f97\u5f88\u5947\u602a\u4e86\uff0c\u9996\u5148\u53bb\u7f51\u4e0a\u641c\u7d22\u4e86\u4e00\u4e0b\u65b9\u6848\uff0c\u53d1\u73b0 spring \u63d0\u5230\u4e86\u4e24\u4e2a\u53d8\u91cf<br \/>spring.devtools.restart.poll-interval<br \/>spring.devtools.restart.quiet-period<\/p>\n<p>\u524d\u8005\u662f spring devtools \u591a\u4e45\u53bb\u68c0\u6d4b\u4e00\u6b21 class \u53d8\u52a8\uff0c\u540e\u8005\u662f devtools \u7f04\u9ed8\u95f4\u9694\u65f6\u95f4\u3002\u7f51\u4e0a\u6709\u4e2a\u89e3\u91ca\uff0c\u8bf4\uff0c\u5982\u679c\u4f60\u7f16\u8bd1\u65f6\u95f4\u592a\u957f\uff0c\u8d85\u8fc7\u4e86 devtools \u7684\u68c0\u6d4b\u65f6\u95f4\uff0c\u5c31\u4f1a\u5bfc\u81f4 devtools \u8ba4\u4e3a\u4f60\u8fd9\u4e2a class \u88ab\u5220\u9664\u4e86\uff0c\u6240\u4ee5\u4e0d\u4f1a\u91cd\u65b0\u8f7d\u5165\u3002<\/p>\n<p>\u6211\u5c1d\u8bd5\u62c9\u957f\u7b2c\u4e00\u4e2a\u9009\u9879\u5230 3 \u79d2\uff0c\u786e\u5b9e\u80fd\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u4f46\u662f\u5f88\u5947\u602a\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u9879\u76ee\u4e0d\u6b62\u8fd9\u4e2a\u6a21\u5757\uff0c\u5176\u5b83\u6a21\u5757\u53ef\u6ca1\u6709\u8bbe\u7f6e\u8fd9\u4e2a\u9009\u9879\u554a\uff0c\u4e3a\u5565\u5176\u5b83\u6a21\u5757\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\uff1f<\/p>\n<p>\u7136\u540e\u6211\u5f00\u59cb\u4e86\u6f2b\u957f\u7684\u5bf9\u6bd4\u6d4b\u8bd5\uff0c\u6700\u7ec8\u53d1\u73b0\uff0c\u51fa\u95ee\u9898\u7684\u8fd9\u4e2a\u6a21\u5757 A\uff0c\u6267\u884c build\u2014\u2014build class \u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u6240\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u548c\u522b\u7684\u6a21\u5757\u6ca1\u6709\u533a\u522b\uff0c\u4f46\u662f\u79bb\u8c31\u7684\u662f\uff0c\u4ece\u65e5\u5fd7\u6eda\u52a8\u53ef\u4ee5\u770b\u51fa\uff0cA \u6a21\u5757\u7684 spring-boot-devtools \u6bd4\u5176\u5b83\u6a21\u5757\uff0c\u66f4\u65e9\u7684\u5f00\u59cb\u6267\u884c\u70ed\u91cd\u8f7d\uff08\u65e5\u5fd7\u5f00\u59cb\u6709\u52a8\u4f5c\u7684\u65f6\u95f4\u70b9\uff09\u3002\u8fd9\u4e00\u70b9\u662f\u5bfc\u81f4 A \u6a21\u5757\u4e22\u5931\u7f16\u8bd1\u7684\u7c7b\u6587\u4ef6\u7684\u6838\u5fc3\u95ee\u9898\u3002<\/p>\n<p>\u6211\u505a\u4e86\u5f88\u591a\u6d4b\u8bd5\uff0c\u5305\u542b\u628a\u4e0a\u9762\u4e24\u4e2a\u914d\u7f6e\u7ed9 A \u6a21\u5757\u548c\u5176\u5b83\u6a21\u5757\u90fd\u914d\u4e0a\uff0c\u800c\u4e14\u90fd\u8bbe\u7f6e\u4e3a\u7cfb\u7edf\u9ed8\u8ba4\u7684\u65f6\u957f\uff0cpoll-interval \u4e3a 1000ms\uff0cquiet-period \u4e3a 400ms \u3002\u4f46\u662f\u6ca1\u7528\uff0cA \u6a21\u5757\u6bcf\u6b21\u90fd\u4f1a\u66f4\u65e9\u7684\uff08\u7f16\u8bd1\u8fdb\u5ea6\u6761\u8fd8\u6ca1\u8dd1\u5b8c\uff09\u70ed\u91cd\u8f7d\u3002\u5b9e\u5728\u60f3\u4e0d\u901a\u8fd9\u662f\u54ea\u4e2a\u73af\u8282\u9020\u6210\u7684\u95ee\u9898\u3002<\/p>\n<p>A \u6a21\u5757\u548c\u5176\u5b83\u6a21\u5757\u90fd\u5728\u4e00\u4e2a\u9879\u76ee\u4e0b\u9762\uff0c\u6267\u884c\u4ed6\u4eec\u7684\u65f6\u5019\u90fd\u5728\u540c\u4e00\u4e2a IDEA\uff0c\u5e94\u8be5\u53ef\u4ee5\u6392\u9664 IDE \u95ee\u9898\uff0c\u6211\u770b\u4e86\u4e00\u4e0b IDE \u751f\u6210\u7684 IML \u6587\u4ef6\uff0c\u4e5f\u6ca1\u53d1\u73b0\u5f02\u5e38\u3002<\/p>\n<p>\u5b9e\u5728\u6ca1\u6709\u601d\u8def\u4e86\uff0c\u8bf7\u9ad8\u4eba\u8d50\u6559      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4913899\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : micean <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e4b\u524d\u6211\u9047\u5230\u8fc7 recompile \u5bfc\u81f4 target \u91cc\u7684\u76f8\u5e94\u6587\u4ef6\u4e22\u5931\u7684\u60c5\u51b5\uff0c\u5177\u4f53\u600e\u4e48\u89e3\u51b3\u7684\u5012\u662f\u5fd8\u8bb0\u4e86\u3002\u3002\u3002\u3002\u6e05\u4e0b idea \u7f13\u5b58\u8bd5\u8bd5\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4913900\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : abcbuzhiming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @micean \u6211\u8fd9\u4e2a\uff0c\u6587\u4ef6\u5e76\u6ca1\u6709\u4e22\u5931\uff0c\u6211\u53bb\u770b\u8fc7\uff0c\u6587\u4ef6\u8fd8\u5728\uff0c\u4f46\u662f spring-boot-devtools \u63d0\u524d\u52a0\u8f7d\u5bfc\u81f4\u5b83\u201c\u9519\u8bef\u201d\u4e86\u8fd9\u4e2a class                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4913901\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kingfalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u88e4\u5b50\u8fd8\u6ca1\u8131\u5c31\u62c9\u4e86\u5457                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8be1\u5f02\u7684\u9879\u76ee\u5f00\u53d1\u65f6\u70ed\u52a0\u8f7d\u4e22\u5931\u7f16\u8bd1\u7684\u7c7b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/275478"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275478"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/275478\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275478"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}