{"id":390,"date":"2022-04-24T09:28:49","date_gmt":"2022-04-24T01:28:49","guid":{"rendered":"https:\/\/blog.lijiajia.top\/?p=390"},"modified":"2026-06-19T21:07:02","modified_gmt":"2026-06-19T13:07:02","slug":"idea%e8%ae%be%e7%bd%ae%e5%bf%ab%e6%8d%b7%e9%94%ae%ef%bc%88%e4%bb%a3%e7%a0%81%e6%a8%a1%e6%9d%bf%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.ttwow.top\/?p=390","title":{"rendered":"idea\u8bbe\u7f6e\u5feb\u6377\u952e\uff08\u4ee3\u7801\u6a21\u677f\uff09"},"content":{"rendered":"<p>\u8f6c\u8f7d\uff1a<a href=\"https:\/\/blog.csdn.net\/weixin_41979605\/article\/details\/109559736\"><a href=\"https:\/\/blog.csdn.net\/weixin_41979605\/article\/details\/109559736\">https:\/\/blog.csdn.net\/weixin_41979605\/article\/details\/109559736<\/a><\/a><\/p>\n<\/p>\n<p>idea\u8bbe\u7f6e\u5feb\u6377\u952e\uff08\u4ee3\u7801\u6a21\u677f\uff09<br \/>\nidea\u91cc\u9762\u975e\u5e38\u597d\u7528\u7684\u662f\u5927\u91cf\u7684\u4ee3\u7801\u6a21\u677f<\/p>\n<p>main<br \/>\n\u5728\u7c7b\u91cc\u9762\u4f7f\u7528main\u5c31\u53ef\u4ee5\u76f4\u63a5\u6253\u51famain\u65b9\u6cd5\u7684\u6a21\u677f\uff0c\u800c\u4e0d\u9700\u8981\u50cfeclipse\u9700\u8981\u5728\u5efa\u7acb\u5de5\u7a0b\u7684\u65f6\u5019\u9009\u62e9<\/p>\n<p>sout<br \/>\n\u4f7f\u7528sout\u5c31\u53ef\u4ee5\u8f93\u51fa\u8f93\u51fa\u6a21\u677f\uff0c\u800c\u907f\u514d\u4e86\u91cd\u590d\u7684\u4ee3\u7801\uff0c\u63d0\u9ad8\u4e86\u7a0b\u5e8f\u5458\u7684\u6267\u884c\u6548\u7387\u3002<br \/>\n\u8fd9\u6837\u7684\u901a\u7528\u7684\u6a21\u677f\u80af\u5b9a\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u7684\u8981\u6c42\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u6a21\u677f\u4f1a\u88ab\u4f7f\u7528\u5230\uff0c\u5982\u4f55\u81ea\u5b9a\u4e49\u6a21\u677f\u5462\uff1f<br \/>\n\u975e\u5e38\u7b80\u5355\uff0csetting-&gt;Editor-&gt;Live Templates<br \/>\n\u5c55\u5f00Java\u90a3\u4e00\u884c\u5c31\u662f\u91cc\u9762\u5305\u542b\u7684\u81ea\u5b9a\u4e49\u6a21\u677f<\/p>\n<p>\u6bd4\u5982main\u65b9\u6cd5<br \/>\nSpringboot\u542f\u52a8\u9879\u76ee\u90fd\u662f\u56fa\u5b9a\u7684\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528springboot\u7684main\u65b9\u6cd5\u7684\u6a21\u677f\u6587\u4ef6\uff0c\u5177\u4f53\u7684\u65b9\u6cd5\u5b9e\u73b0\u5c31\u53c2\u8003main\u65b9\u6cd5\u7684\u8bbe\u7f6e\uff0c\u6bd4\u5982\u6211\u7684\u8bbe\u7f6e\u5982\u4e0b:<br \/>\n\u540d\u79f0\u4e3amainboot\uff0c\u63cf\u8ff0\u53ef\u4ee5\u81ea\u5df1\u5199\uff0c\u91cc\u9762\u7684\u5185\u5bb9\u5982\u4e0b\uff0c\u4e3b\u8981\u662f\u4e0b\u9762\u7684\u9009\u9879\u8981\u9009\u62e9\u5230Java\u91cc\u9762\u7684Declaration\uff0c\u8fd9\u4e2a\u8868\u793a\u7684\u5c31\u662f\u4f5c\u7528\u7684\u8303\u56f4\uff0c\u4eff\u7167\u7740\u81ea\u5e26\u7684main\u7684\u6765\u9009\u62e9\u7684\uff0c\u4e0d\u7136\u4f60\u8f93\u5165mainboot\u4e5f\u662f\u5f39\u4e0d\u51fa\u6765\u6a21\u677f\u6587\u4ef6\u7684\u3002<\/p>\n<pre><code class=\"language-java\">public static void main(String[] args){\n    SpringApplication.run(.class,args);\n}<\/code><\/pre>\n<p>\u6bd4\u5982\u4f11\u7720\u7684\u65b9\u6cd5\u53ef\u4ee5\u4eff\u7167\u7740sout\u65b9\u6cd5\u6765\u5199<br \/>\n\u540d\u5b57tsleep\uff0c\u5185\u5bb9\u5982\u4e0b\uff0c\u8303\u56f4\u548csout\u7684\u4e00\u81f4<\/p>\n<pre><code class=\"language-java\">try { TimeUnit.SECONDS.sleep(); }catch (InterruptedException e) { e.printStackTrace(); }<\/code><\/pre>\n<p>\u8fd9\u4e2a\u53c2\u8003\u539f\u6765\u81ea\u5e26\u7684\u65b9\u6cd5\uff0c\u5c31\u53ef\u4ee5\u81ea\u5df1\u6478\u7d22\uff0c\u5e2e\u52a9\u8fd8\u662f\u6709\u7684\u3002<\/p>\n<p>\u65f6\u95f4\u662f\u5b9d\u8d35\u7684\uff0c\u51c6\u5907\u5de5\u4f5c\u505a\u7684\u597d\uff0c\u90a3\u4e48\u5f00\u53d1\u5de5\u4f5c\u5c06\u4f1a\u6e38\u5203\u6709\u4f59\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1ahttps:\/\/blog.csdn.net\/weixin_41979605\/article\/detail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[133],"tags":[41],"class_list":["post-390","post","type-post","status-publish","format-standard","hentry","category-dev-tools","tag-idea"],"_links":{"self":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=390"}],"version-history":[{"count":1,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/390\/revisions"}],"predecessor-version":[{"id":2058,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/390\/revisions\/2058"}],"wp:attachment":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}