{"id":4214,"date":"2021-12-02T14:31:51","date_gmt":"2021-12-02T06:31:51","guid":{"rendered":"http:\/\/123.57.164.21\/?p=4214"},"modified":"2021-12-02T14:31:51","modified_gmt":"2021-12-02T06:31:51","slug":"idea%e5%88%9b%e5%bb%baspring-boot%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=4214","title":{"rendered":"IDEA\u521b\u5efaSpring Boot\u9879\u76ee"},"content":{"rendered":"\n<p>\u672c\u8282\uff0c\u6211\u4eec\u5c06\u4e3a\u60a8\u8be6\u7ec6\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528 IDEA \u521b\u5efa\u4e00\u4e2a Spring Boot \u9879\u76ee\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u914d\u7f6e\u5f00\u53d1\u73af\u5883<\/h5>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5728\u4f7f\u7528 Spring Boot \u8fdb\u884c\u5f00\u53d1\u4e4b\u524d\uff0c\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u914d\u7f6e\u597d\u5f00\u53d1\u73af\u5883\u3002\u8fd9\u91cc\u6211\u4eec\u4ee5 Windows \u64cd\u4f5c\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\uff0c\u8bf7\u5bf9\u7167\u5176\u76f8\u5173\u8bbe\u7f6e\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668\uff0cIDE\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u7684\u9009\u62e9\u76f8\u5f53\u91cd\u8981\uff0c\u76ee\u524d\u5e02\u9762\u4e0a\u6709\u5f88\u591a\u4f18\u79c0\u7684 IDE \u5f00\u53d1\u5de5\u5177\uff0c\u4f8b\u5982 IntelliJ IDEA\u3001Spring Tools\u3001Visual Studio Code \u548c Eclipse \u7b49\u7b49\uff0c\u90a3\u4e48\u6211\u4eec\u8be5\u5982\u4f55\u9009\u62e9\u5462\uff1f<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u6781\u529b\u63a8\u8350\u5927\u5bb6\u4f7f\u7528 IntelliJ IDEA\uff0c\u56e0\u4e3a\u76f8\u6bd4\u4e8e\u4e0e\u5176\u4ed6 IDE\uff0cIntelliJ IDEA \u5bf9 Spring Boot \u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u652f\u6301\u3002<\/p>\n\n\n\n<p>Spring Boot \u7248\u672c\u53ca\u5176\u73af\u5883\u914d\u7f6e\u8981\u6c42\u5982\u4e0b\u8868\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-5.png\" alt=\"\" class=\"wp-image-4216\" width=\"184\" height=\"145\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-5.png 408w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-5-300x237.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-5-230x182.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-5-350x276.png 350w\" sizes=\"(max-width: 184px) 100vw, 184px\" \/><\/figure><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u5728\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/www.oracle.com\/java\/technologies\/oracle-java-archive-downloads.html\" target=\"_blank\">Java \u5b98\u65b9\u7f51\u7ad9<\/a>\u4e0b\u8f7d JDK 8.0 \u53ca\u4ee5\u4e0a\u7248\u672c\uff0cJDK \u7684\u5b89\u88c5\u4ee5\u53ca\u73af\u5883\u914d\u7f6e\u8bf7\u53c2\u8003<a href=\"http:\/\/c.biancheng.net\/view\/1286.html\">\u00a0<\/a><a rel=\"noreferrer noopener\" href=\"http:\/\/c.biancheng.net\/view\/1286.html\" target=\"_blank\">Java JDK\u4e0b\u8f7d\u4e0e\u5b89\u88c5\u6559\u7a0b<\/a>\u00a0\u548c\u00a0<a rel=\"noreferrer noopener\" href=\"http:\/\/c.biancheng.net\/view\/1290.html\" target=\"_blank\">Java JDK\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/a>\u00a0\u3002<\/p><p>Maven 3.x \u7684\u4e0b\u8f7d\u5b89\u88c5\u53ca\u914d\u7f6e\u8fc7\u7a0b\uff0c\u8bf7\u53c2\u8003\u00a0<a rel=\"noreferrer noopener\" href=\"http:\/\/c.biancheng.net\/maven2\/install-configure.html\" target=\"_blank\">Maven \u5b89\u88c5\u4e0e\u914d\u7f6e<\/a>\u3002<\/p><p>\u6d4f\u89c8\u5668\u8bbf\u95ee\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/www.jetbrains.com\/idea\/download\" target=\"_blank\">IntelliJ IDEA \u5b98\u65b9\u4e0b\u8f7d\u9875\u9762<\/a>\uff0c\u4e0b\u8f7d\u5e76\u5b89\u88c5 IntelliJ IDEA\u3002<\/p><\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">\u521b\u5efa Spring Boot \u9879\u76ee<\/h5>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5f00\u53d1\u73af\u5883\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7 Intellij IDEA \u521b\u5efa\u4e00\u4e2a Spring Boot \u9879\u76ee\u4e86\u3002<\/p>\n\n\n\n<p>&nbsp;Intellij IDEA \u4e00\u822c\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u521b\u5efa Spring Boot \u9879\u76ee\uff1a<\/p>\n\n\n\n<ul><li>\u4f7f\u7528 Maven \u521b\u5efa<\/li><li>\u4f7f\u7528 Spring Initializr \u521b\u5efa<\/li><\/ul>\n\n\n\n<p><strong>\u4f7f\u7528 Maven \u521b\u5efa<\/strong><\/p>\n\n\n\n<ul><li>1. \u4f7f\u7528 IntelliJ IDEA \u521b\u5efa\u4e00\u4e2a\u540d\u79f0\u4e3a helloworld \u7684 Maven \u9879\u76ee\uff0c\u521b\u5efa\u8fc7\u7a0b\u8bf7\u53c2\u8003\u00a0<a href=\"http:\/\/c.biancheng.net\/maven2\/idea-build-maven.html\">IDEA \u65b0\u5efa Maven \u9879\u76ee<\/a>\u3002<\/li><\/ul>\n\n\n\n<ul><li>2. \u5728\u8be5 Maven \u9879\u76ee\u7684 pom.xml \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff0c\u5bfc\u5165 Spring Boot \u76f8\u5173\u7684\u4f9d\u8d56\u3002<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;project>\n    ...\n  &lt;parent>\n        &lt;groupId>org.springframework.boot&lt;\/groupId>\n        &lt;artifactId>spring-boot-starter-parent&lt;\/artifactId>\n        &lt;version>2.4.5&lt;\/version>\n        &lt;relativePath\/> &lt;!-- lookup parent from repository -->\n    &lt;\/parent>\n  \n    &lt;dependencies>\n        &lt;dependency>\n            &lt;groupId>org.springframework.boot&lt;\/groupId>\n            &lt;artifactId>spring-boot-starter-web&lt;\/artifactId>\n        &lt;\/dependency>\n        &lt;dependency>\n            &lt;groupId>org.springframework.boot&lt;\/groupId>\n            &lt;artifactId>spring-boot-starter-test&lt;\/artifactId>\n            &lt;scope>test&lt;\/scope>\n        &lt;\/dependency>\n    &lt;\/dependencies>\n...\n&lt;\/project>\n<\/pre>\n\n\n\n<ul><li>3. \u5728 net.biancheng.www \u5305\u4e0b\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u00a0helloWorldApplication \u4e3b\u7a0b\u5e8f\uff0c\u7528\u6765\u542f\u52a8 Spring Boot \u5e94\u7528\uff0c\u4ee3\u7801\u5982\u4e0b\u3002<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">package net.biancheng.www;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n@SpringBootApplication\npublic class helloWorldApplication {\n    public static void main(String[] args) {\n        SpringApplication.run(helloWorldApplication.class, args);\n    }\n}\n<\/pre>\n\n\n\n<p>Spring Boot \u9879\u76ee\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-6.png\" alt=\"\" class=\"wp-image-4217\" width=\"510\" height=\"620\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6.png 822w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6-247x300.png 247w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6-768x934.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6-230x280.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6-350x426.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-6-480x584.png 480w\" sizes=\"(max-width: 510px) 100vw, 510px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u4f7f\u7528 Spring Initializr \u521b\u5efa<\/strong><\/p>\n\n\n\n<p>IntelliJ IDEA \u652f\u6301\u7528\u6237\u4f7f\u7528 Spring \u9879\u76ee\u521b\u5efa\u5411\u5bfc\uff08Spring Initializr&nbsp;\uff09\u5feb\u901f\u5730\u521b\u5efa\u4e00\u4e2a Spring Boot \u9879\u76ee\uff0c\u6b65\u9aa4\u5982\u4e0b\u3002<\/p>\n\n\n\n<ul><li>1. \u5728\u00a0IntelliJ IDEA \u6b22\u8fce\u9875\u9762\u5de6\u4fa7\u9009\u62e9 Project \uff0c\u7136\u540e\u5728\u53f3\u4fa7\u9009\u62e9 New Project\uff0c\u5982\u4e0b\u56fe\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-7-1024x697.png\" alt=\"\" class=\"wp-image-4219\" width=\"582\" height=\"395\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-1024x697.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-300x204.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-768x523.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-1536x1046.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-830x565.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-230x157.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-350x238.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7-480x327.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-7.png 1760w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/figure><\/div>\n\n\n\n<p>\u6216\u8005\u5728 IntelliJ IDEA \u5de5\u4f5c\u533a\u4e0a\u65b9\u7684\u83dc\u5355\u680f\u4e2d\u9009\u62e9 File \uff0c\u5728\u4e0b\u62c9\u83dc\u5355\u4e2d\u9009\u5219 New\uff0c\u7136\u540e\u9009\u62e9 Project\uff0c\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-8-1024x939.png\" alt=\"\" class=\"wp-image-4220\" width=\"585\" height=\"536\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-1024x939.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-300x275.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-768x704.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-830x761.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-230x211.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-350x321.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8-480x440.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-8.png 1348w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/figure><\/div>\n\n\n\n<ul><li>2. \u5728\u65b0\u5efa\u5de5\u7a0b\u754c\u9762\u5de6\u4fa7\uff0c\u9009\u62e9 Spring Initializr\uff0c\u9009\u62e9\u9879\u76ee\u7684 SDK \u4e3a 1.8\uff0c\u9009\u62e9 starter service URL \u4e3a http:\/\/start.spring.io\uff08\u9ed8\u8ba4\uff09\uff0c\u6700\u540e\u70b9\u51fb\u4e0b\u65b9\u7684 Next \u6309\u94ae\u8fdb\u884c\u4e0b\u4e00\u6b65\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-9-1024x537.png\" alt=\"\" class=\"wp-image-4221\" width=\"614\" height=\"321\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-1024x537.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-300x157.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-768x403.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-1536x806.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-830x435.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-230x121.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-350x184.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9-480x252.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-9.png 1758w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/figure><\/div>\n\n\n\n<ul><li>3. IDEA \u4f1a\u8fde\u63a5\u7f51\u7edc\uff0c\u5e76\u6839\u636e starter service URL \u67e5\u8be2 Spring Boot \u7684\u5f53\u524d\u53ef\u7528\u7248\u672c\u548c\u7ec4\u4ef6\u5217\u8868\uff0c\u5982\u4e0b\u56fe\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-10-1024x496.png\" alt=\"\" class=\"wp-image-4222\" width=\"541\" height=\"261\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-1024x496.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-300x145.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-768x372.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-1536x744.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-830x402.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-230x111.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-350x169.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10-480x232.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-10.png 1768w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/figure><\/div>\n\n\n\n<ul><li>4. \u5728 Spring Initializr Project Settings \u4e2d\uff0c\u8f93\u5165\u9879\u76ee\u7684 GroupId\u3001ArtifactId \u7b49\u5185\u5bb9\uff0c\u6ce8\u610f Type \u4e3a Maven\uff0cpackaging \u4e3a jar\uff0cJava version \u5207\u6362\u4e3a 8\uff08\u9ed8\u8ba4\u4e3a 11\uff09\uff0c\u6700\u540e\u70b9\u51fb\u4e0b\u65b9\u7684 Next \u6309\u94ae\uff0c\u8fdb\u884c\u4e0b\u4e00\u6b65\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-11-1024x978.png\" alt=\"\" class=\"wp-image-4223\" width=\"470\" height=\"449\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-1024x978.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-300x287.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-768x734.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-830x793.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-230x220.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-350x334.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11-480x459.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-11.png 1206w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/figure><\/div>\n\n\n\n<ul><li>5. \u5728 dependencise \u754c\u9762\u4e2d\uff0c\u9009\u62e9 Spring Boot \u7684\u7248\u672c\u53ca\u6240\u4f9d\u8d56\u7684 Spring Boot \u7ec4\u4ef6\uff08\u4f8b\u5982 Spring Boot \u7684\u7248\u672c\u4e3a 2.4.5\uff0c Spring Boot \u7ec4\u4ef6\u4e3a Web\uff09\uff0c\u7136\u540e\u70b9\u51fb\u4e0b\u65b9\u7684 Next \u6309\u94ae\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-12-1024x755.png\" alt=\"\" class=\"wp-image-4224\" width=\"517\" height=\"381\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-1024x755.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-300x221.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-768x566.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-1536x1133.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-830x612.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-230x170.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-350x258.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12-480x354.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-12.png 1774w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/figure><\/div>\n\n\n\n<ul><li>6. \u6839\u636e\u9700\u8981\u4fee\u6539\u9879\u76ee\u540d\u79f0\u53ca\u9879\u76ee\u5b58\u50a8\u4f4d\u7f6e\u7b49\u4fe1\u606f\uff0c\u6700\u540e\u70b9\u51fb Finish \u6309\u94ae\uff0c\u5b8c\u6210 Spring Boot \u9879\u76ee\u7684\u521b\u5efa\uff0c\u5982\u4e0b\u56fe\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-13-1024x790.png\" alt=\"\" class=\"wp-image-4225\" width=\"507\" height=\"391\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-1024x790.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-300x231.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-768x592.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-830x640.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-230x177.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-350x270.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13-480x370.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-13.png 1206w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/><\/figure><\/div>\n\n\n\n<ul><li>7. \u8fd4\u56de IDEA \u5de5\u4f5c\u533a\uff0c\u53ef\u4ee5\u770b\u5230 Spring Boot \u9879\u76ee helloworld \u5df2\u7ecf\u521b\u5efa\u5b8c\u6210\u3002\u8be5\u9879\u76ee\u4e0d\u4f46\u5177\u6709\u5b8c\u6574\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u8fd8\u6709\u5b8c\u6574\u7684 Maven \u914d\u7f6e\uff0c\u5e76\u9ed8\u8ba4\u751f\u6210\u4e86\u4e00\u4e2a\u540d\u4e3a HelloworldApplication \u7684\u4e3b\u542f\u52a8\u7a0b\u5e8f\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-14.png\" alt=\"\" class=\"wp-image-4226\" width=\"441\" height=\"503\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14.png 810w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14-263x300.png 263w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14-768x876.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14-230x262.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14-350x399.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-14-480x548.png 480w\" sizes=\"(max-width: 441px) 100vw, 441px\" \/><\/figure><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u6b64\u65f6\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u51c6\u5907\u5de5\u4f5c\u90fd\u5df2\u7ecf\u51c6\u5907\u5c31\u7eea\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u6ca1\u6709\u7f16\u5199\u4efb\u4f55\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u76f4\u63a5\u5c06\u8be5 Spring Boot \u9879\u76ee\u8fd0\u884c\u8d77\u6765\u3002<\/p><\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">\u542f\u52a8 Spring Boot<\/h5>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cSpring&nbsp; Boot \u9879\u76ee\u4f1a\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a&nbsp;***Application&nbsp;\u7684\u4e3b\u7a0b\u5e8f\u542f\u52a8\u7c7b \uff0c\u8be5\u7c7b\u4e2d\u4f7f\u7528\u4e86\u4e00\u4e2a\u7ec4\u5408\u6ce8\u89e3 @SpringBootApplication\uff0c\u7528\u6765\u5f00\u542f Spring Boot \u7684\u81ea\u52a8\u914d\u7f6e\uff0c\u53e6\u5916\u8be5\u542f\u52a8\u7c7b\u4e2d\u5305\u542b\u4e00\u4e2a main() \u65b9\u6cd5\uff0c\u7528\u6765\u542f\u52a8\u8be5\u9879\u76ee\u3002<\/p>\n\n\n\n<p>\u76f4\u63a5\u8fd0\u884c\u542f\u52a8\u7c7b\u00a0HelloworldApplication \u4e2d\u7684 main() \u65b9\u6cd5\uff0c\u4fbf\u53ef\u4ee5\u542f\u52a8\u8be5\u9879\u76ee\uff0c\u7ed3\u679c\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-15-1024x313.png\" alt=\"\" class=\"wp-image-4227\" width=\"599\" height=\"182\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-1024x313.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-300x92.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-768x235.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-1536x470.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-830x254.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-230x70.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-350x107.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15-480x147.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-15.png 1778w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/figure><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u6ce8\u610f\uff1aSpring Boot \u5185\u90e8\u96c6\u6210\u4e86 Tomcat\uff0c\u4e0d\u9700\u8981\u4eba\u4e3a\u624b\u52a8\u914d\u7f6e Tomcat\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5173\u6ce8\u5177\u4f53\u7684\u4e1a\u52a1\u903b\u8f91\u5373\u53ef\u3002<\/p><\/blockquote>\n\n\n\n<p>\u4e3a\u4e86\u80fd\u6bd4\u8f83\u7684\u6e05\u695a\u7684\u770b\u5230\u6548\u679c\uff0c\u6211\u4eec\u5728 net.biancheng.www \u5305\u4e0b\u53c8\u521b\u5efa\u4e00\u4e2a controller \u5305\uff0c\u5e76\u5728\u8be5\u5305\u5185\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a HelloController \u7684 Controller\uff0c\u4ee3\u7801\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">package net.biancheng.www.controller;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.ResponseBody;\n@Controller\npublic class HelloController {\n    @ResponseBody\n    @RequestMapping(\"\/hello\")\n    public String hello() {\n        return \"Hello World!\";\n    }\n}\n<\/pre>\n\n\n\n<p>\u91cd\u542f Spring Boot \u9879\u76ee\uff0c\u7136\u540e\u5728\u5730\u5740\u680f\u8bbf\u95ee \u201chttp:\/\/localhost:8080\/hello\u201d\uff0c\u7ed3\u679c\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-16-1024x303.png\" alt=\"\" class=\"wp-image-4228\" width=\"584\" height=\"172\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-1024x303.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-300x89.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-768x227.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-830x245.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-230x68.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-350x103.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16-480x142.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-16.png 1516w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u8282\uff0c\u6211\u4eec\u5c06\u4e3a\u60a8\u8be6\u7ec6\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528 IDEA \u521b\u5efa\u4e00\u4e2a Spring Boot \u9879\u76ee\u3002 \u914d\u7f6e\u5f00\u53d1\u73af\u5883 \u5728\u4f7f\u7528 S [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4214"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4214"}],"version-history":[{"count":4,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4214\/revisions"}],"predecessor-version":[{"id":4230,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4214\/revisions\/4230"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}