{"id":19742,"date":"2025-04-19T02:12:52","date_gmt":"2025-04-18T18:12:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/19742.html"},"modified":"2025-04-19T02:12:52","modified_gmt":"2025-04-18T18:12:52","slug":"%e9%80%9a%e8%bf%87%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%e5%85%8d%e8%b4%b9%e9%83%a8%e7%bd%b2%e6%88%91%e4%bb%ac%e7%9a%84springbootvue%e9%a1%b9%e7%9b%ae-%e5%ae%9e%e7%8e%b0%e8%b7%9f%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/19742.html","title":{"rendered":"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c"},"content":{"rendered":"<\/p>\n<p>\u524d\u6587\u8bb2\u5230\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u80fd\u591f\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u4e2a\u4eba\u7535\u8111\u7684\u9759\u6001\u8d44\u6e90\u3002\u672c\u6587\u5c06\u8bb2\u89e3\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u672c\u5730\u7684\u9879\u76ee&#xff0c;\u5b9e\u73b0\u8ddf\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c&#xff1a;\u524d\u6587\u94fe\u63a5&#xff1a;\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u4e2a\u4eba\u7535\u8111\u8d44\u6e90\u8be6\u7ec6\u8fc7\u7a0b&#xff08;\u514d\u8d39&#xff09;&#xff08;NatApp &#043; Tomcat&#xff09;-CSDN\u535a\u5ba2<\/p>\n<p>\u5982\u679c\u9047\u5230tomcat\u542f\u52a8\u95ea\u9000\u95ee\u9898\u53ef\u4ee5\u67e5\u770b\u535a\u4e3b\u7684&#xff1a;Tomcat \u542f\u52a8\u95ea\u9000\u95ee\u9898-CSDN\u535a\u5ba2<\/p>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E5%89%8D%E8%A8%80-toc\" style=\"margin-left:0px\">\u524d\u8a00<\/p>\n<p id=\"1.%20%E5%90%8E%E7%AB%AFSpringBoot%E9%A1%B9%E7%9B%AE-toc\" style=\"margin-left:0px\">1. \u540e\u7aefSpringBoot\u9879\u76ee<\/p>\n<p id=\"1.1%20%E5%B0%86springboot%E9%A1%B9%E7%9B%AE%E6%89%93%E6%88%90war%E5%8C%85-toc\" style=\"margin-left:40px\">1.1 \u5c06springboot\u9879\u76ee\u6253\u6210war\u5305<\/p>\n<p id=\"%C2%A01.2%20%E9%83%A8%E7%BD%B2%E5%88%B0%E6%9C%AC%E5%9C%B0%E7%9A%84tomcat-toc\" style=\"margin-left:40px\">\u00a01.2 \u90e8\u7f72\u5230\u672c\u5730\u7684tomcat<\/p>\n<p id=\"2.1%20%E6%89%93%E5%8C%85Vue%E9%A1%B9%E7%9B%AE%E5%B9%B6%E5%AE%8C%E6%88%90%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F-toc\" style=\"margin-left:0px\">2.1 \u6253\u5305Vue\u9879\u76ee\u5e76\u5b8c\u6210\u5185\u7f51\u7a7f\u900f<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"%E5%89%8D%E8%A8%80\">\u524d\u8a00<\/h2>\n<p>\u00a0 \u00a0 \u00a0 \u00a0\u00a0\u65e2\u7136\u80fd\u591f\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u8bbf\u95ee\u5230\u672c\u5730\u7684\u9759\u6001\u8d44\u6e90&#xff0c;\u90a3\u4e48\u5c31\u80fd\u591f\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u8bbf\u95ee\u5230\u672c\u5730\u7684\u8fd0\u884c\u7684\u9879\u76ee\u3002<\/p>\n<p>\u00a0<span style=\"color:#fe2c24\">\u53cb\u60c5\u63d0\u793a&#xff1a;\u6700\u597d\u770b\u4e00\u4e0b\u4e4b\u524d\u7684\u6587\u7ae0&#xff1a;<\/span>\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u4e2a\u4eba\u7535\u8111\u8d44\u6e90\u8be6\u7ec6\u8fc7\u7a0b&#xff08;\u514d\u8d39&#xff09;&#xff08;NatApp &#043; Tomcat&#xff09;-CSDN\u535a\u5ba2<\/p>\n<\/p>\n<h2 id=\"1.%20%E5%90%8E%E7%AB%AFSpringBoot%E9%A1%B9%E7%9B%AE\">1. \u540e\u7aefSpringBoot\u9879\u76ee<\/h2>\n<h3 id=\"1.1%20%E5%B0%86springboot%E9%A1%B9%E7%9B%AE%E6%89%93%E6%88%90war%E5%8C%85\">1.1 \u5c06springboot\u9879\u76ee\u6253\u6210war\u5305<\/h3>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u5728\u6253\u5305\u4e4b\u524d\u8981\u5bf9\u6211\u4eec\u7684pom.xml\u6587\u4ef6\u8fdb\u884c\u4fee\u6539&#xff0c;\u9996\u5148\u8981\u8bbe\u7f6e\u6253\u5305\u683c\u5f0f&#xff0c;\u8bbe\u7f6e\u6210war&#xff0c;\u56e0\u4e3a\u9ed8\u8ba4\u662f\u6253\u6210jar\u5305<\/p>\n<p>&lt;packaging&gt;war&lt;\/packaging&gt; <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"289\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181245-6802961ddc1f0.png\" width=\"803\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u4e4b\u540e\u8981\u79fb\u9664springboot\u81ea\u5e26\u7684tomcat\u5bb9\u5668&#xff0c;\u56e0\u4e3a\u540e\u7eed\u662f\u4f7f\u7528\u5230\u5916\u90e8\u7684tomcat\u5bb9\u5668&#xff08;\u6ce8\u610f&#xff1a;\u6211\u4eec\u79fb\u9664\u4e4b\u540espringboot\u9879\u76ee\u5c31\u4e0d\u80fd\u591f\u6b63\u5e38\u542f\u52a8\u4e86&#xff0c;\u6240\u4ee5\u6211\u4eec\u5fc5\u987b\u8981\u6ce8\u89c6\u6389\u624d\u80fd\u6b63\u5e38\u542f\u52a8&#xff0c;\u6253\u5305\u7684\u65f6\u5019\u5728\u53d6\u6d88\u6ce8\u91ca&#xff09;<\/p>\n<p>&lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;<br \/>\n&lt;!&#8211;            \u79fb\u9664\u81ea\u5e26\u7684tomcat&#8211;&gt;<br \/>\n            &lt;exclusions&gt;<br \/>\n                &lt;exclusion&gt;<br \/>\n                    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n                    &lt;artifactId&gt;spring-boot-starter-tomcat&lt;\/artifactId&gt;<br \/>\n                &lt;\/exclusion&gt;<br \/>\n            &lt;\/exclusions&gt;<br \/>\n        &lt;\/dependency&gt; <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"621\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181246-6802961e0cd07.png\" width=\"865\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u56e0\u4e3a\u6211\u4eec\u79fb\u9664\u4e86tomcat\u5bb9\u5668\u4f1a\u5c11\u4e00\u4e2aservlet-api\u7684\u4e00\u4e2a\u4f9d\u8d56&#xff0c;\u6240\u4ee5\u6211\u4eec\u5fc5\u987b\u5f15\u5165\u4ee5\u4e0b<\/p>\n<p>&lt;!&#8211;        \u79fb\u9664tomcat\u5bb9\u5668\u4f1a\u7f3a\u5c11servlet\u4f9d\u8d56&#8211;&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;javax.servlet&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;javax.servlet-api&lt;\/artifactId&gt;<br \/>\n            &lt;scope&gt;provided&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt; <\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u63a5\u4e0b\u6765\u8fd8\u9700\u8981\u5bf9\u6211\u4eec\u7684\u4e3b\u8981\u542f\u52a8\u7c7b\u8fdb\u884c\u4fee\u6539<\/p>\n<p>&#064;SpringBootApplication<br \/>\npublic class Application extends SpringBootServletInitializer {<\/p>\n<p>    &#064;Override<br \/>\n    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {<br \/>\n        return application.sources(Application.class);<br \/>\n    }<\/p>\n<p>    public static void main(String[] args) {<br \/>\n        SpringApplication.run(Application.class,args);<br \/>\n    }<br \/>\n} <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"405\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181246-6802961e43e5b.png\" width=\"899\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u63a5\u4e0b\u6765\u5c31\u6765\u5230\u4e86\u6253\u5305\u73af\u8282&#xff0c;\u70b9\u51fb\u53f3\u4fa7\u7684maven\u9009\u9879&#xff0c;\u9009\u62e9lifecycle&#xff0c;\u70b9\u51fbclean&#xff08;\u6e05\u9664target&#xff09;&#xff0c;\u5b8c\u6210\u4e4b\u540e\u5728\u70b9\u51fbinstall&#xff08;\u786e\u8ba4\u4f9d\u8d56\u6210\u529f\u4e0b\u8f7d&#xff09;&#xff0c;\u6700\u540e\u70b9\u51fbpackage&#xff08;\u6253\u5305&#xff09;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"539\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181246-6802961e736bb.png\" width=\"416\" \/><\/p>\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"762\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181246-6802961e960ba.png\" width=\"1200\" \/><\/p>\n<h3 id=\"%C2%A01.2%20%E9%83%A8%E7%BD%B2%E5%88%B0%E6%9C%AC%E5%9C%B0%E7%9A%84tomcat\">\u00a01.2 \u90e8\u7f72\u5230\u672c\u5730\u7684tomcat<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u627e\u5230\u6211\u4eec\u7684war\u5305&#xff0c;\u5c06\u5176\u590d\u5236\u5230tomcat\u7684webapps\u76ee\u5f55\u4e0b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"845\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181247-6802961f297c9.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u53ef\u4ee5\u5bf9war\u8fdb\u884c\u4e00\u4e2a\u91cd\u547d\u540d&#xff0c;\u53ef\u4ee5\u547d\u540d\u77ed\u4e00\u70b9&#xff0c;\u6211\u8fd9\u91cc\u91cd\u547d\u540d\u4e3alight&#xff0c;\u7136\u540e\u5c06\u5176\u89e3\u538b\u3002\u89e3\u538b\u4e4b\u540elight\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"845\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181247-6802961f8ca0a.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u89e3\u538b\u4e4b\u540e\u5c31\u53ef\u4ee5\u5220\u9664war\u5305\u4e86\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6211\u4eec\u63a5\u4e0b\u6765\u8fdb\u884c\u6d4b\u8bd5&#xff0c;\u67e5\u770b\u901a\u8fc7tomcat\u80fd\u5426\u6b63\u5e38\u542f\u52a8\u6211\u4eec\u7684springboot\u9879\u76ee\u3002<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6253\u5f00tomcat\u7684bin\u76ee\u5f55&#xff0c;\u5728\u8be5\u76ee\u5f55\u8f93\u5165cmd\u6253\u5f00\u63a7\u5236\u53f0\u8f93\u5165startup\u547d\u4ee4\u542f\u52a8tomcat\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"646\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181248-680296200af5e.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6b63\u5e38\u542f\u52a8&#xff01;&#xff01;&#xff01;\u5728\u6d4f\u89c8\u5668\u8f93\u5165localhost:tomcat\u7aef\u53e3\u53f7&#xff0c;\u6211tomcat\u7684\u7aef\u53e3\u53f7\u662f3000&#xff08;\u9ed8\u8ba4\u4e3a8080&#xff09;&#xff0c;\u5982\u679c\u60f3\u8981\u8bbf\u95ee\u5230\u6211\u4eec\u7684springboot\u9879\u76ee&#xff0c;\u5c31\u9700\u8981\u5e26\u4e0a\u6211\u4eec\u521a\u521a\u89e3\u538b\u7684\u8def\u5f84\u540d\u79f0&#xff0c;\u6bd4\u5982\u6211\u8fd9\u91cc\u7684light\u9879\u76ee\u7684\u8bbf\u95ee\u8def\u5f84\u4e3a&#xff1a;localhost:3000\/light\u00a0<\/p>\n<p><span style=\"color:#fe2c24\">\u00a0\u9700\u8981\u6ce8\u610f\u7684\u662f<\/span>&#xff1a;tomcat\u7684\u670d\u52a1\u5668\u7684\u7aef\u53e3\u4f1a\u8986\u76d6springboot\u9879\u76ee\u7684\u7aef\u53e3&#xff0c;\u6240\u4ee5springboot\u9879\u76ee\u7684\u7aef\u53e3\u53f7\u662f\u6ca1\u6709\u4f5c\u7528\u7684&#xff0c;\u6211\u4eec\u8bbf\u95ee\u9879\u76ee\u662f\u901a\u8fc7\u4ed6\u5728tomcat\u7684\u6587\u4ef6\u5939\u540d\u79f0\u6765\u8bbf\u95ee\u7684&#xff0c;\u5305\u62ec\u4f60\u8bbe\u7f6e\u7684\u9879\u76ee\u540d\u79f0\u90fd\u662f\u6ca1\u7528\u7684&#xff0c;\u4e00\u5207\u4ee5tomcat\u7684\u6587\u4ef6\u540d\u79f0\u4e3a\u51c6<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6211springboot\u9879\u76ee\u6709\u5982\u4e0b\u7684controller<\/p>\n<p>&#064;RestController<br \/>\n&#064;RequestMapping(&#034;\/test&#034;)<br \/>\npublic class TestController {<\/p>\n<p>    &#064;GetMapping(&#034;\/getstr&#034;)<br \/>\n    public String test(){<br \/>\n        return &#034;hello world&#034;;<br \/>\n    }<br \/>\n}<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6240\u4ee5\u6211\u4eec\u901a\u8fc7\u8bbf\u95ee\u8be5\u8def\u5f84\u6765\u6d4b\u8bd5\u662f\u5426\u90e8\u7f72\u6210\u529f&#xff0c;\u662f\u5426\u80fd\u591f\u8bbf\u95ee\u5230&#xff1a;\u8f93\u5165\u4ee5\u4e0b\u8def\u5f84&#xff1a;<\/p>\n<p>localhost:3000\/light\/test\/getstr<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"821\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181248-68029620aaf41.png\" width=\"968\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6210\u529f\u8bbf\u95ee\u5230&#xff01;&#xff01;&#xff01;<\/p>\n<p>2.1 \u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u8fdc\u7a0b\u8bbf\u95ee\u5230\u540e\u7aef\u9879\u76ee<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u542f\u52a8NatApp&#xff0c;&#xff08;\u5177\u4f53\u5185\u5bb9\u53c2\u8003\u6211\u4e0a\u4e00\u7bc7\u535a\u5ba2&#xff1a;\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u5b9e\u73b0\u8fdc\u7a0b\u8bbf\u95ee\u4e2a\u4eba\u7535\u8111\u8d44\u6e90\u8be6\u7ec6\u8fc7\u7a0b&#xff08;\u514d\u8d39&#xff09;&#xff08;NatApp &#043; Tomcat&#xff09;-CSDN\u535a\u5ba2&#xff09;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"635\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181248-68029620eae54.png\" width=\"1129\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165&#xff1a;\u7f51\u5740&#043;\/light\/test\/getstr&#xff0c; \u80fd\u591f\u8bbf\u95ee\u5230&#xff01;&#xff01;&#xff01;\u5c31\u7b97\u662f\u5176\u4ed6\u7535\u8111\/\u624b\u673a\u8bbe\u5907\u90fd\u80fd\u591f\u8bbf\u95ee\u5230&#xff0c;\u8fd9\u5c31\u5b9e\u73b0\u4e86\u5c06springboot\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"821\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181249-680296214e49c.png\" width=\"968\" \/><\/p>\n<h2 id=\"2.1%20%E6%89%93%E5%8C%85Vue%E9%A1%B9%E7%9B%AE%E5%B9%B6%E5%AE%8C%E6%88%90%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F\">2.1 \u6253\u5305Vue\u9879\u76ee\u5e76\u5b8c\u6210\u5185\u7f51\u7a7f\u900f<\/h2>\n<p>\u00a0 \u00a0 \u00a0 \u00a0<span style=\"color:#fe2c24\"> \u5728\u6253\u5305Vue\u9879\u76ee\u7684\u5168\u8fc7\u7a0b\u4e2d\u5343\u4e07\u4e0d\u8981\u5c06natapp\u7ed9\u505c\u6b62\u4e86&#xff0c;\u56e0\u4e3a\u4f7f\u7528\u7684\u662f\u514d\u8d39\u96a7\u9053&#xff0c;\u6bcf\u6b21\u91cd\u65b0\u6253\u5f00\u6211\u4eecnatapp\u63d0\u4f9b\u7684\u7f51\u5740\u5c31\u4f1a\u53d8\u6362&#xff0c;\u4e00\u53d8\u5316\u5c31\u9700\u8981\u4fee\u6539Vue\u9879\u76ee\u7684\u8bf7\u6c42\u8def\u5f84<\/span><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u5728\u6253\u5305Vue\u9879\u76ee\u4e4b\u524d&#xff0c;\u9700\u8981\u4fee\u6539\u524d\u7aef\u5411\u540e\u6bb5\u53d1\u9001ajax\/axios\u8bf7\u6c42\u7684\u8def\u5f84&#xff0c;\u56e0\u4e3a\u6211\u4eec\u540e\u7aef\u7684\u5730\u5740\u5df2\u7ecf\u53d8\u6210\u4e86\u00a0http:\/\/bs9p3v.natappfree.cc\/light\u00a0\u800c\u4e0d\u518d\u662f127.0.0.1:8088\/app \u8fd9\u79cd\u672c\u5730\u8bbf\u95ee\u8def\u5f84\u4e86<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"643\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181249-680296218fc07.png\" width=\"825\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u7136\u540e\u524d\u7aef\u8fd8\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u4e1c\u897f&#xff0c;\u5c31\u662f\u5f00\u542f\u5176\u4ed6ip\u5730\u5740\u8bbf\u95ee\u9879\u76ee\u7684\u914d\u7f6e<\/p>\n<p>disableHostCheck:true <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"345\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181249-68029621cf6e4.png\" width=\"966\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u5728vue\u9879\u76ee\u7684\u6839\u8def\u5f84\u4e0b\u6267\u884cnpm run build\u547d\u4ee4\u5bf9vue\u9879\u76ee\u8fdb\u884c\u6253\u5305&#xff0c;\u4f1a\u5728\u6839\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2adist\u6587\u4ef6\u5939&#xff0c;\u5c31\u662f\u6211\u4eec\u6253\u5305\u540e\u7684\u6587\u4ef6&#xff08;dist\u6587\u4ef6\u5939\u5c31\u8ddf\u6211\u4eecwar\u89e3\u538b\u4e4b\u540e\u662f\u4e00\u6837\u7684\u6548\u679c&#xff0c;\u90fd\u662f\u7f16\u8bd1\u4e4b\u540e\u7684\u5185\u5bb9&#xff09;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"981\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181250-6802962202fb4.png\" width=\"1200\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"845\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181250-68029622795b4.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u5728tomcat\u7684webapps\u7684\u6587\u4ef6\u5939\u4e2d\u65b0\u5efa\u4e00\u4e2afront\u6587\u4ef6\u5939\u7528\u6765\u5b58\u653edist\u6587\u4ef6\u5939\u4e2d\u7684\u5185\u5bb9<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u5c06dist\u6587\u4ef6\u5939\u4e2d\u7684\u6240\u6709\u5185\u5bb9\u76f4\u63a5\u590d\u5236\u5230webapps\u4e0b\u7684front\u6587\u4ef6\u5939<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"845\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181250-68029622dfe5d.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u7136\u540e\u91cd\u542f\u6211\u4eec\u672c\u5730\u7684tomcat&#xff08;\u5343\u4e07\u4e0d\u8981\u628anatapp\u505c\u6b62\u4e86&#xff09;&#xff1a;\u76f4\u63a5\u5173\u6389tomcat\u7684\u547d\u4ee4\u7a97\u53e3&#xff0c;\u91cd\u65b0\u8fdb\u5165tomcat\u7684bin\u76ee\u5f55\u4e0b&#xff0c;\u6253\u5f00cmd\u63a7\u5236\u53f0\u8f93\u5165startup\u547d\u4ee4\u8fd0\u884ctomcat\u5373\u53ef<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6210\u529f\u542f\u52a8tomcat\u4e4b\u540e&#xff0c;\u5c31\u6765\u6d4b\u8bd5\u80fd\u5426\u8bbf\u95ee\u5230\u6211\u4eec\u7684vue\u9879\u76ee&#xff0c;\u4ee5\u53cavue\u9879\u76ee\u80fd\u5426\u5411\u540e\u7aef\u53d1\u9001\u8bf7\u6c42&#xff0c;\u5728\u6d4f\u89c8\u5668\u8f93\u5165&#xff1a;\u00a0http:\/\/bs9p3v.natappfree.cc\/front\u3002<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u56e0\u4e3a\u662f\u514d\u8d39\u7684\u96a7\u9053&#xff0c;\u6240\u4ee5\u53ef\u80fd\u6bd4\u8f83\u6162\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"821\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181251-6802962351d7f.png\" width=\"1200\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6210\u529f\u8bbf\u95ee\u5230\u3002\u5e76\u4e14\u4e5f\u80fd\u591f\u6b63\u5e38\u7684\u5411\u540e\u7aef\u53d1\u9001\u8bf7\u6c42&#xff01;&#xff01;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0\u81f3\u6b64\u6211\u4eec\u5c31\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u5b9e\u73b0\u4e86\u5c06\u9879\u76ee\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c\u4e86&#xff08;<span style=\"color:#fe2c24\">\u7528\u5b8c\u4e4b\u540e\u8bb0\u5f97\u5c06natapp\u5173\u95ed\u4e86<\/span>&#xff09;<\/p>\n<p>\u9e1f\u6b32\u9ad8\u98de\u5148\u632f\u7fc5&#xff0c;\u4eba\u6c42\u4e0a\u8fdb\u5148\u8bfb\u4e66\u3002\u2014\u2014\u540d\u8a00\u51fa\u5904&#xff1a;\u674e\u82e6\u7985<\/p>\n<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u901a\u8fc7\u514d\u8d39\u7684\u5185\u7f51\u7a7f\u900f\u8fdc\u7a0b\/\u7f51\u7edc\u8bbf\u95ee\u672c\u5730\u9879\u76ee\uff0c\u8fbe\u5230\u8ddf\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c\u3002_vue\u5185\u7f51\u7a7f\u900f<\/p>\n","protected":false},"author":2,"featured_media":19725,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1271,458,415,1524,227,1525,942],"topic":[],"class_list":["post-19742","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-springboot","tag-vue","tag-415","tag-1524","tag-227","tag-1525","tag-942"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \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\/19742.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u901a\u8fc7\u514d\u8d39\u7684\u5185\u7f51\u7a7f\u900f\u8fdc\u7a0b\/\u7f51\u7edc\u8bbf\u95ee\u672c\u5730\u9879\u76ee\uff0c\u8fbe\u5230\u8ddf\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c\u3002_vue\u5185\u7f51\u7a7f\u900f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/19742.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T18:12:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181245-6802961ddc1f0.png\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/19742.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/19742.html\",\"name\":\"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T18:12:52+00:00\",\"dateModified\":\"2025-04-18T18:12:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/19742.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/19742.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/19742.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c\"}]},{\"@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":"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \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\/19742.html","og_locale":"zh_CN","og_type":"article","og_title":"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e34\u6b21\uff0c\u6536\u85cf39\u6b21\u3002\u901a\u8fc7\u514d\u8d39\u7684\u5185\u7f51\u7a7f\u900f\u8fdc\u7a0b\/\u7f51\u7edc\u8bbf\u95ee\u672c\u5730\u9879\u76ee\uff0c\u8fbe\u5230\u8ddf\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c\u3002_vue\u5185\u7f51\u7a7f\u900f","og_url":"https:\/\/www.wsisp.com\/helps\/19742.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T18:12:52+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418181245-6802961ddc1f0.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/19742.html","url":"https:\/\/www.wsisp.com\/helps\/19742.html","name":"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T18:12:52+00:00","dateModified":"2025-04-18T18:12:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/19742.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/19742.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/19742.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u901a\u8fc7\u5185\u7f51\u7a7f\u900f\u514d\u8d39\u90e8\u7f72\u6211\u4eec\u7684springboot+vue\u9879\u76ee \u5b9e\u73b0\u8ddf\u670d\u52a1\u5668\u4e00\u6837\u7684\u6548\u679c"}]},{"@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\/19742","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=19742"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/19742\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/19725"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=19742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=19742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=19742"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=19742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}