{"id":59728,"date":"2026-01-14T11:57:34","date_gmt":"2026-01-14T03:57:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/59728.html"},"modified":"2026-01-14T11:57:34","modified_gmt":"2026-01-14T03:57:34","slug":"spring-boot%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba%e5%92%8c%e9%a1%b9%e7%9b%ae%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/59728.html","title":{"rendered":"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8"},"content":{"rendered":"<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b2c01\u8bfe&#xff1a;Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c02\u8bfe&#xff1a;Spring Boot\u8fd4\u56deJson\u6570\u636e\u53ca\u6570\u636e\u5c01\u88c5<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c03\u8bfe&#xff1a;Spring Boot\u4f7f\u7528slf4j\u8fdb\u884c\u65e5\u5fd7\u8bb0\u5f55<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c04\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u9879\u76ee\u5c5e\u6027\u914d\u7f6e<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c05\u8bfe&#xff1a;Spring Boot\u4e2d\u7684MVC\u652f\u6301<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c06\u8bfe&#xff1a;Spring Boot\u96c6\u6210Swagger2\u5c55\u73b0\u5728\u7ebf\u63a5\u53e3\u6587\u6863<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c07\u8bfe&#xff1a;Spring Boot\u96c6\u6210Thymeleaf\u6a21\u677f\u5f15\u64ce<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c08\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u5168\u5c40\u5f02\u5e38\u5904\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c09\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u5207\u9762AOP\u5904\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c10\u8bfe&#xff1a;Spring Boot\u4e2d\u96c6\u6210MyBatis<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c11\u8bfe&#xff1a;Spring Boot\u4e8b\u52a1\u914d\u7f6e\u7ba1\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c12\u8bfe&#xff1a;Spring Boot\u4e2d\u4f7f\u7528\u76d1\u542c\u5668<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c13\u8bfe&#xff1a;Spring Boot\u4e2d\u4f7f\u7528\u62e6\u622a\u5668<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c14\u8bfe&#xff1a;Spring Boot\u4e2d\u96c6\u6210Redis<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c15\u8bfe&#xff1a;Spring Boot\u4e2d\u96c6\u6210ActiveMQ<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c16\u8bfe&#xff1a;Spring Boot\u4e2d\u96c6\u6210Shiro<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c17\u8bfe&#xff1a;Spring Boot\u4e2d\u7ed3\u6210Lucence<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u7b2c18\u8bfe&#xff1a;Spring Boot\u642d\u5efa\u5b9e\u9645\u9879\u76ee\u5f00\u53d1\u4e2d\u7684\u67b6\u6784<\/p>\n<h2 style=\"text-align:justify\">\u7b2c01\u8bfe&#xff1a;Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e0a\u4e00\u8282\u5bf9 SpringBoot \u7684\u7279\u6027\u505a\u4e86\u4e00\u4e2a\u4ecb\u7ecd&#xff0c;\u672c\u8282\u4e3b\u8981\u5bf9 **jdk \u7684\u914d\u7f6e\u3001Spring Boot\u5de5\u7a0b\u7684\u6784\u5efa\u548c\u9879\u76ee\u7684\u542f\u52a8\u3001Spring Boot \u9879\u76ee\u5de5\u7a0b\u7684\u7ed3\u6784\u505a\u4e00\u4e0b\u8bb2\u89e3\u548c\u5206\u6790**\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">## 1. jdk \u7684\u914d\u7f6e<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u672c\u8bfe\u7a0b\u662f\u4f7f\u7528 IDEA \u8fdb\u884c\u5f00\u53d1&#xff0c;\u5728IDEA \u4e2d\u914d\u7f6e jdk \u7684\u65b9\u5f0f\u5f88\u7b80\u5355&#xff0c;\u6253\u5f00&#096;File-&gt;Project Structure&#096;&#xff0c;\u5982\u4e0b\u56fe\u6240&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">![IDEA\u4e2d\u914d\u7f6ejdk](https:\/\/images.gitbook.cn\/9befde80-8659-11e8-9b0d-95de449dc107)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">1. \u9009\u62e9 SDKs<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">2. \u5728 JDK home path \u4e2d\u9009\u62e9\u672c\u5730 jdk \u7684\u5b89\u88c5\u76ee\u5f55<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">3. \u5728 Name \u4e2d\u4e3a jdk \u81ea\u5b9a\u4e49\u540d\u5b57<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u901a\u8fc7\u4ee5\u4e0a\u4e09\u6b65\u9aa4&#xff0c;\u5373\u53ef\u5bfc\u5165\u672c\u5730\u5b89\u88c5\u7684 jdk\u3002\u5982\u679c\u662f\u4f7f\u7528 STS \u6216\u8005 eclipse \u7684\u670b\u53cb&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4e24\u6b65\u9aa4\u6dfb\u52a0&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* &#096;window-&gt;preference-&gt;java-&gt;Instralled JRES&#096;\u6765\u6dfb\u52a0\u672c\u5730 jdk\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* &#096;window&#8211;&gt;preference&#8211;&gt;java&#8211;&gt;Compiler&#096;\u9009\u62e9 jre&#xff0c;\u548c jdk \u4fdd\u6301\u4e00\u81f4\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">## 2. Spring Boot \u5de5\u7a0b\u7684\u6784\u5efa<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">### 2.1 IDEA \u5feb\u901f\u6784\u5efa<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">IDEA \u4e2d\u53ef\u4ee5\u901a\u8fc7&#096;File-&gt;New-&gt;Project&#096;\u6765\u5feb\u901f\u6784\u5efa Spring Boot \u5de5\u7a0b\u3002\u5982\u4e0b&#xff0c;\u9009\u62e9 Spring Initializr&#xff0c;\u5728 Project SDK \u4e2d\u9009\u62e9\u521a\u521a\u6211\u4eec\u5bfc\u5165\u7684 jdk&#xff0c;\u70b9\u51fb Next&#xff0c;\u5230\u4e86\u9879\u76ee\u7684\u914d\u7f6e\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* Group&#xff1a;\u586b\u4f01\u4e1a\u57df\u540d&#xff0c;\u672c\u8bfe\u7a0b\u4f7f\u7528com.itcodai<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* Artifact&#xff1a;\u586b\u9879\u76ee\u540d\u79f0&#xff0c;\u672c\u8bfe\u7a0b\u4e2d\u6bcf\u4e00\u8bfe\u7684\u5de5\u7a0b\u540d\u4ee5&#096;course&#043;\u8bfe\u53f7&#096;\u547d\u4ee4&#xff0c;\u8fd9\u91cc\u4f7f\u7528 course01<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* Dependencies&#xff1a;\u53ef\u4ee5\u6dfb\u52a0\u6211\u4eec\u9879\u76ee\u4e2d\u6240\u9700\u8981\u7684\u4f9d\u8d56\u4fe1\u606f&#xff0c;\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u6765\u6dfb\u52a0&#xff0c;\u672c\u8bfe\u7a0b\u53ea\u9700\u8981\u9009\u62e9 Web \u5373\u53ef\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">### 2.2 \u5b98\u65b9\u6784\u5efa<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b2c\u4e8c\u79cd\u65b9\u5f0f\u53ef\u4ee5\u901a\u8fc7\u5b98\u65b9\u6784\u5efa&#xff0c;\u6b65\u9aa4\u5982\u4e0b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u8bbf\u95ee http:\/\/start.spring.io\/\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u5728\u9875\u9762\u4e0a\u8f93\u5165\u76f8\u5e94\u7684 Spring Boot \u7248\u672c\u3001Group \u548c Artifact \u4fe1\u606f\u4ee5\u53ca\u9879\u76ee\u4f9d\u8d56&#xff0c;\u7136\u540e\u521b\u5efa\u9879\u76ee\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* ![\u521b\u5efaSpring Boot\u5de5\u7a0b](https:\/\/images.gitbook.cn\/014a1ba0-865b-11e8-956e-f528114b28bd)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* \u89e3\u538b\u540e&#xff0c;\u4f7f\u7528 IDEA \u5bfc\u5165\u8be5 maven \u5de5\u7a0b&#xff1a;&#096;File-&gt;New-&gt;Model from Existing Source&#096;&#xff0c;\u7136\u540e\u9009\u62e9\u89e3\u538b\u540e\u7684\u9879\u76ee\u6587\u4ef6\u5939\u5373\u53ef\u3002\u5982\u679c\u662f\u4f7f\u7528 eclipse \u7684\u670b\u53cb&#xff0c;\u53ef\u4ee5\u901a\u8fc7&#096;Import-&gt;Existing Maven Projects-&gt;Next&#096;&#xff0c;\u7136\u540e\u9009\u62e9\u89e3\u538b\u540e\u7684\u9879\u76ee\u6587\u4ef6\u5939\u5373\u53ef\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">### 2.3 maven\u914d\u7f6e<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u521b\u5efa\u4e86 Spring Boot \u9879\u76ee\u4e4b\u540e&#xff0c;\u9700\u8981\u8fdb\u884c maven \u914d\u7f6e\u3002\u6253\u5f00&#096;File-&gt;settings&#096;&#xff0c;\u641c\u7d22 maven&#xff0c;\u914d\u7f6e\u4e00\u4e0b\u672c\u5730\u7684 maven \u4fe1\u606f\u3002\u5982\u4e0b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">![maven\u914d\u7f6e](https:\/\/images.gitbook.cn\/2ff7b930-865b-11e8-8675-5537a701ae7d)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5728 Maven home directory \u4e2d\u9009\u62e9\u672c\u5730 Maven \u7684\u5b89\u88c5\u8def\u5f84&#xff1b;\u5728 User settings file \u4e2d\u9009\u62e9\u672c\u5730 Maven \u7684\u914d\u7f6e\u6587\u4ef6\u6240\u5728\u8def\u5f84\u3002\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d&#xff0c;\u6211\u4eec\u914d\u7f6e\u4e00\u4e0b\u56fd\u5185\u963f\u91cc\u7684\u955c\u50cf&#xff0c;\u8fd9\u6837\u5728\u4e0b\u8f7d maven \u4f9d\u8d56\u65f6&#xff0c;\u901f\u5ea6\u5f88\u5feb\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;xml<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;mirror&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;id&gt;nexus-aliyun&lt;\/id&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;mirrorOf&gt;*&lt;\/mirrorOf&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;name&gt;Nexus aliyun&lt;\/name&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;url&gt;http:\/\/maven.aliyun.com\/nexus\/content\/groups\/public&lt;\/url&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&lt;\/mirror&gt;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5982\u679c\u662f\u4f7f\u7528 eclipse \u7684\u670b\u53cb&#xff0c;\u53ef\u4ee5\u901a\u8fc7&#096;window&#8211;&gt;preference&#8211;&gt;Maven&#8211;&gt;User Settings&#096;\u6765\u914d\u7f6e&#xff0c;\u914d\u7f6e\u65b9\u5f0f\u548c\u4e0a\u9762\u4e00\u81f4\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">### 2.4 \u7f16\u7801\u914d\u7f6e<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u540c\u6837\u5730&#xff0c;\u65b0\u5efa\u9879\u76ee\u540e&#xff0c;\u6211\u4eec\u4e00\u822c\u90fd\u9700\u8981\u914d\u7f6e\u7f16\u7801&#xff0c;\u8fd9\u70b9\u975e\u5e38\u91cd\u8981&#xff0c;\u5f88\u591a\u521d\u5b66\u8005\u90fd\u4f1a\u5fd8\u8bb0\u8fd9\u4e00\u6b65&#xff0c;\u6240\u4ee5\u8981\u517b\u6210\u826f\u597d\u7684\u4e60\u60ef\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">IDEA \u4e2d&#xff0c;\u4ecd\u7136\u662f\u6253\u5f00&#096;File-&gt;settings&#096;&#xff0c;\u641c\u7d22 encoding&#xff0c;\u914d\u7f6e\u4e00\u4e0b\u672c\u5730\u7684\u7f16\u7801\u4fe1\u606f\u3002\u5982\u4e0b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">![\u7f16\u7801\u914d\u7f6e](https:\/\/images.gitbook.cn\/57564e60-865b-11e8-8a91-d70bc2d847c5)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5982\u679c\u662f\u4f7f\u7528 eclipse \u7684\u670b\u53cb&#xff0c;\u6709\u4e24\u4e2a\u5730\u65b9\u9700\u8981\u8bbe\u7f6e\u4e00\u4e0b\u7f16\u7801&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* window&#8211;&gt; perferences&#8211;&gt;General&#8211;&gt;Workspace&#xff0c;\u5c06Text file encoding\u6539\u6210utf-8<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* window&#8211;&gt;perferences&#8211;&gt;General&#8211;&gt;content types&#xff0c;\u9009\u4e2dText&#xff0c;\u5c06Default encoding\u586b\u5165utf-8<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">OK&#xff0c;\u7f16\u7801\u8bbe\u7f6e\u5b8c\u6210\u5373\u53ef\u542f\u52a8\u9879\u76ee\u5de5\u7a0b\u4e86\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">## 3. Spring Boot \u9879\u76ee\u5de5\u7a0b\u7ed3\u6784<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Spring Boot \u9879\u76ee\u603b\u5171\u6709\u4e09\u4e2a\u6a21\u5757&#xff0c;\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">![Spring Boot\u9879\u76ee\u5de5\u7a0b\u7ed3\u6784](https:\/\/images.gitbook.cn\/8b32fa80-865b-11e8-9d13-03ea4b4d8504)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* src\/main\/java\u8def\u5f84&#xff1a;\u4e3b\u8981\u7f16\u5199\u4e1a\u52a1\u7a0b\u5e8f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* src\/main\/resources\u8def\u5f84&#xff1a;\u5b58\u653e\u9759\u6001\u6587\u4ef6\u548c\u914d\u7f6e\u6587\u4ef6<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">* src\/test\/java\u8def\u5f84&#xff1a;\u4e3b\u8981\u7f16\u5199\u6d4b\u8bd5\u7a0b\u5e8f<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u5982\u4e0a\u56fe\u6240\u793a\u4f1a\u521b\u5efa\u4e00\u4e2a\u542f\u52a8\u7c7b Course01Application&#xff0c;\u8be5\u7c7b\u4e0a\u9762\u6709\u4e2a&#096;&#064;SpringBootApplication&#096;\u6ce8\u89e3&#xff0c;\u8be5\u542f\u52a8\u7c7b\u4e2d\u6709\u4e2a main \u65b9\u6cd5&#xff0c;\u6ca1\u9519&#xff0c;Spring Boot \u542f\u52a8\u53ea\u8981\u8fd0\u884c\u8be5 main \u65b9\u6cd5\u5373\u53ef&#xff0c;\u975e\u5e38\u65b9\u4fbf\u3002\u53e6\u5916&#xff0c;Spring Boot \u5185\u90e8\u96c6\u6210\u4e86 tomcat&#xff0c;\u4e0d\u9700\u8981\u6211\u4eec\u4eba\u4e3a\u624b\u52a8\u53bb\u914d\u7f6e tomcat&#xff0c;\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5173\u6ce8\u5177\u4f53\u7684\u4e1a\u52a1\u903b\u8f91\u5373\u53ef\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5230\u6b64\u4e3a\u6b62&#xff0c;Spring Boot \u5c31\u542f\u52a8\u6210\u529f\u4e86&#xff0c;\u4e3a\u4e86\u6bd4\u8f83\u6e05\u695a\u7684\u770b\u5230\u6548\u679c&#xff0c;\u6211\u4eec\u5199\u4e00\u4e2a Controller \u6765\u6d4b\u8bd5\u4e00\u4e0b&#xff0c;\u5982\u4e0b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;java<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">package com.itcodai.course01.controller;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">import org.springframework.web.bind.annotation.RequestMapping;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">import org.springframework.web.bind.annotation.RestController;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#064;RestController<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#064;RequestMapping(&#034;\/start&#034;)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">public class StartController {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0&#064;RequestMapping(&#034;\/springboot&#034;)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0public String startSpringBoot() {<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return &#034;Welcome to the world of Spring Boot!&#034;;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u91cd\u65b0\u8fd0\u884c main \u65b9\u6cd5\u542f\u52a8\u9879\u76ee&#xff0c;\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 &#096;localhost:8080\/start\/springboot&#096;&#xff0c;\u5982\u679c\u770b\u5230 &#096;\u201cWelcome to the world of Spring Boot!\u201d&#096;&#xff0c;\u90a3\u4e48\u606d\u559c\u4f60\u9879\u76ee\u542f\u52a8\u6210\u529f&#xff01;Spring Boot \u5c31\u662f\u8fd9\u4e48\u7b80\u5355\u65b9\u4fbf&#xff01;\u7aef\u53e3\u53f7\u9ed8\u8ba4\u662f8080&#xff0c;\u5982\u679c\u60f3\u8981\u4fee\u6539&#xff0c;\u53ef\u4ee5\u5728 application.yml \u6587\u4ef6\u4e2d\u4f7f\u7528 &#096;server.port&#096; \u6765\u4eba\u4e3a\u6307\u5b9a\u7aef\u53e3&#xff0c;\u59828001\u7aef\u53e3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;xml<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">server:<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u00a0\u00a0port: 8001<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#096;&#096;&#096;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">## 4. \u603b\u7ed3<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u672c\u8282\u6211\u4eec\u5feb\u901f\u5b66\u4e60\u4e86\u5982\u4f55\u5728 IDEA \u4e2d\u5bfc\u5165 jdk&#xff0c;\u4ee5\u53ca\u4f7f\u7528 IDEA \u5982\u4f55\u914d\u7f6e maven \u548c\u7f16\u7801&#xff0c;\u5982\u4f55\u5feb\u901f\u7684\u521b\u5efa\u548c\u542f\u52a8 Spring Boot \u5de5\u7a0b\u3002IDEA \u5bf9 Spring Boot \u7684\u652f\u6301\u975e\u5e38\u53cb\u597d&#xff0c;\u5efa\u8bae\u5927\u5bb6\u4f7f\u7528 IDEA \u8fdb\u884c Spring Boot \u7684\u5f00\u53d1&#xff0c;\u4ece\u4e0b\u4e00\u8bfe\u5f00\u59cb&#xff0c;\u6211\u4eec\u771f\u6b63\u8fdb\u5165 Spring Boot \u7684\u5b66\u4e60\u4e2d\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8bfe\u7a0b\u6e90\u4ee3\u7801\u4e0b\u8f7d\u5730\u5740&#xff1a;[\u6233\u6211\u4e0b\u8f7d](https:\/\/gitee.com\/eson15\/springboot_study)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c01\u8bfe&#xff1a;Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8* \u7b2c02\u8bfe&#xff1a;Spring Boot\u8fd4\u56deJson\u6570\u636e\u53ca\u6570\u636e\u5c01\u88c5* \u7b2c03\u8bfe&#xff1a;Spring Boot\u4f7f\u7528slf4j\u8fdb\u884c\u65e5\u5fd7\u8bb0\u5f55* \u7b2c04\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u9879\u76ee\u5c5e\u6027\u914d\u7f6e* \u7b2c05\u8bfe&#xff1a;Spring Boot\u4e2d\u7684MVC\u652f\u6301* \u7b2c06\u8bfe&#xff1a;Spring Boot\u96c6\u6210Swagger2\u5c55\u73b0\u5728\u7ebf\u63a5\u53e3\u6587\u6863* \u7b2c07\u8bfe&#xff1a;Spring B<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,190],"topic":[],"class_list":["post-59728","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/59728.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7b2c01\u8bfe&#xff1a;Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8* \u7b2c02\u8bfe&#xff1a;Spring Boot\u8fd4\u56deJson\u6570\u636e\u53ca\u6570\u636e\u5c01\u88c5* \u7b2c03\u8bfe&#xff1a;Spring Boot\u4f7f\u7528slf4j\u8fdb\u884c\u65e5\u5fd7\u8bb0\u5f55* \u7b2c04\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u9879\u76ee\u5c5e\u6027\u914d\u7f6e* \u7b2c05\u8bfe&#xff1a;Spring Boot\u4e2d\u7684MVC\u652f\u6301* \u7b2c06\u8bfe&#xff1a;Spring Boot\u96c6\u6210Swagger2\u5c55\u73b0\u5728\u7ebf\u63a5\u53e3\u6587\u6863* \u7b2c07\u8bfe&#xff1a;Spring B\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/59728.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-14T03:57:34+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59728.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/59728.html\",\"name\":\"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-14T03:57:34+00:00\",\"dateModified\":\"2026-01-14T03:57:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/59728.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/59728.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59728.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/59728.html","og_locale":"zh_CN","og_type":"article","og_title":"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7b2c01\u8bfe&#xff1a;Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8* \u7b2c02\u8bfe&#xff1a;Spring Boot\u8fd4\u56deJson\u6570\u636e\u53ca\u6570\u636e\u5c01\u88c5* \u7b2c03\u8bfe&#xff1a;Spring Boot\u4f7f\u7528slf4j\u8fdb\u884c\u65e5\u5fd7\u8bb0\u5f55* \u7b2c04\u8bfe&#xff1a;Spring Boot\u4e2d\u7684\u9879\u76ee\u5c5e\u6027\u914d\u7f6e* \u7b2c05\u8bfe&#xff1a;Spring Boot\u4e2d\u7684MVC\u652f\u6301* \u7b2c06\u8bfe&#xff1a;Spring Boot\u96c6\u6210Swagger2\u5c55\u73b0\u5728\u7ebf\u63a5\u53e3\u6587\u6863* \u7b2c07\u8bfe&#xff1a;Spring B","og_url":"https:\/\/www.wsisp.com\/helps\/59728.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-14T03:57:34+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/59728.html","url":"https:\/\/www.wsisp.com\/helps\/59728.html","name":"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-14T03:57:34+00:00","dateModified":"2026-01-14T03:57:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/59728.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/59728.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/59728.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Spring Boot\u5f00\u53d1\u73af\u5883\u642d\u5efa\u548c\u9879\u76ee\u542f\u52a8"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=59728"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59728\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=59728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=59728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=59728"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=59728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}