{"id":32878,"date":"2025-04-26T05:15:26","date_gmt":"2025-04-25T21:15:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/32878.html"},"modified":"2025-04-26T05:15:26","modified_gmt":"2025-04-25T21:15:26","slug":"%e5%9c%a8ubuntu%e4%b8%ad%e6%90%ad%e5%bb%baspringboot%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8cvite-vue%e5%89%8d%e7%ab%af4-springboot","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/32878.html","title":{"rendered":"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot"},"content":{"rendered":"<\/p>\n<h4>SpringBoot<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u7cfb\u7edf\u548c\u73af\u5883<\/li>\n<li>\u521b\u5efaSpringBoot\u9879\u76ee<\/li>\n<li>\u6253\u5305\u6d4b\u8bd5<\/li>\n<li>\u670d\u52a1\u5668\u90e8\u7f72springboot\u7a0b\u5e8f<\/li>\n<li>\n<ul>\n<li>\u5173\u95edssh\u63a7\u5236\u53f0\u540e\uff0c\u4fdd\u6301jar\u8fd0\u884c<\/li>\n<li>\u914d\u7f6e\u5f00\u673a\u542f\u52a8<\/li>\n<\/ul>\n<\/li>\n<li>\u5c0f\u7ed3<\/li>\n<\/ul>\n<h2>\u524d\u8a00<\/h2>\n<p>\u6839\u636e\u6211\u7684\u7ecf\u9a8c\uff0c\u5728\u8fd9\u91cc\u7ed9\u51fa\u4e00\u4e9b\u5efa\u8bae\u4ec5\u4f9b\u53c2\u8003\uff1a<\/p>\n<ul>\n<li>Spring Boot\u548cVite-vue\u7684\u4ee3\u7801\u53ef\u4ee5\u4e0d\u653e\u5728\u670d\u52a1\u5668\u4e0a\u7f16\u5199\uff0c\u53ef\u4ee5\u5728Windows\u4e0b\u5f00\u53d1\u6d4b\u8bd5\uff0c\u5b8c\u6210\u7684\u529f\u80fd\u53ef\u4ee5\u6253\u5305\u6210jar\u5305(springboot)\u548cdist\u9759\u6001\u8d44\u6e90(vite-vue)\u653e\u5230\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u5373\u53ef<\/li>\n<li>\u5728\u670d\u52a1\u5668\u4e0aNode.js,Nginx,open-jdk,mysql \u662f\u5fc5\u987b\u7684\uff0c\u8981\u786e\u4fdd\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c<\/li>\n<li>\u5728windows\u4e0aNode.js\u662f\u5fc5\u987b\u7684\uff0c\u56e0\u4e3a\u5728\u672c\u5730\u8c03\u8bd5Vue\u9879\u76ee\u548c\u6253\u5305dist\u8d44\u6e90\u9700\u8981\u7528\u5230\uff1bmysql\u662f\u5fc5\u987b\u7684\uff0c\u8c03\u8bd5springboot\u4e2d\u7684\u6570\u636e\u5e93\u63a5\u53e3\u65f6\u9700\u8981\uff1bjdk\u53ef\u4ee5\u901a\u8fc7InteliJ\u7ba1\u7406\uff0c\u7248\u672c\u9700\u8981\u548c\u670d\u52a1\u5668\u4e0a\u7684\u4e00\u81f4\uff0c\u907f\u514d\u67d0\u4e9bjava\u7279\u6027\u4e0d\u652f\u6301\uff0c\u7528\u4e8e\u672c\u5730\u8fd0\u884c\u548c\u6253\u5305springboot\u9879\u76ee\uff1b<\/li>\n<li>\u672c\u5730\u8fd0\u884cvue\u524d\u7aef\u8fde\u63a5\u7684springboot\u7aef\u53e3\u548c\u670d\u52a1\u5668\u8fd0\u884cvue\u524d\u7aef\u8fde\u63a5\u7684\u7aef\u53e3\u8def\u5f84\u53ef\u80fd\u4e0d\u540c\uff0c\u6253\u5305\u53d1\u5e03\u524d\u6ce8\u610f\u8fdb\u884c\u5207\u6362\uff0c\u8fd9\u662f\u4e00\u4e2a\u5fe0\u544a\u3002<\/li>\n<\/ul>\n<h2>\u7cfb\u7edf\u548c\u73af\u5883<\/h2>\n<p>\u7cfb\u7edf\u5e73\u53f0: Ubuntu20.4 \u73af\u5883\uff1a \u524d\u7aef\uff1aNode.js,Vite-Vue,Element-plus \u540e\u7aef\uff1a Nginx openjdk 17.0.12 2024-07-16 mysql Ver 8.0.39-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu)) SpringBoot(Jar\u5305\u5f62\u5f0f\u8fd0\u884c)<\/p>\n<h2>\u521b\u5efaSpringBoot\u9879\u76ee<\/h2>\n<p>\u5982\u56fe\uff0c\u5728InteliJ\u65b0\u5efaSpringBoot\u9879\u76ee <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250425211522-680bfb6ab5e9f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"> \u6839\u636e\u4f60\u7684\u9700\u6c42\u52fe\u9009\u4f9d\u8d56\uff0c\u6216\u8005\u4e0d\u52fe\u9009\u540e\u7eed\u518d\u624b\u52a8\u6dfb\u52a0\u4f9d\u8d56\uff1b\u6211\u8fd9\u91cc\u4e0d\u52fe\u9009\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250425211523-680bfb6bb63c4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"> \u521b\u5efa\u5b8c\u6210\uff0c\u5982\u4e0b\u56fe\u3002\u6253\u5f00pom.xml\u6587\u4ef6\uff0c\u6dfb\u52a02\u4e2d\u7684\u4f9d\u8d56\u9879\uff0c\u7136\u540e\u70b9\u51fb3\u52a0\u8f7dmaven\u7684\u66f4\u6539\uff0cIDEA\u4f1a\u81ea\u52a8\u5e2e\u4f60\u4e0b\u8f7d\u8fd9\u4e9b\u4f9d\u8d56\u3002\u8fd9\u4e9b\u4ee5\u6765\u5206\u522b\u6709\u4ec0\u4e48\u4f5c\u7528\u540e\u9762\u540e\u8bb2\u5230\uff0c\u6216\u8005\u81ea\u5df1\u53bb\u67e5\u67e5\u8be6\u7ec6\u7684\u8bf4\u660e\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250425211524-680bfb6cb8756.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"> \u5728resources\/application.properties\u6587\u4ef6\u4e2d\u52a0\u5165\u8fd9\u4e9b\u5185\u5bb9\uff1a<\/p>\n<p>#\u6307\u5b9a\u670d\u52a1\u7aef\u53e3<br \/>\nserver.port=8080<\/p>\n<p>#config mysql<br \/>\nspring.datasource.name=test<br \/>\nspring.datasource.url=jdbc:mysql:\/\/localhost:3306\/test?useSSL=false<br \/>\nspring.datasource.username=root<br \/>\nspring.datasource.password=Raysees_works@589<br \/>\nspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver<\/p>\n<p># mybatis<br \/>\nmybatis.mapper-locations=classpath:\/mappers\/*.xml<br \/>\nmybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl<\/p>\n<p>\u4fee\u6539src\/main\/java\/com\/example\/demo\/DemoApplication.java\u6587\u4ef6\uff1a<\/p>\n<p><span class=\"token keyword\">package<\/span> <span class=\"token namespace\">com<span class=\"token punctuation\">.<\/span>example<span class=\"token punctuation\">.<\/span>demo<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>boot<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">SpringApplication<\/span><span class=\"token punctuation\">;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u672c\u8282\u4ecb\u7ecd\u4e86Spring Boot\u9879\u76ee\u5728Windows\u4e0a\u8fd0\u884c\u3001\u7f16\u8bd1\u3001\u6253\u5305\u7684\u6d41\u7a0b\uff0c\u4ee5\u53ca\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684\u64cd\u4f5c\u3002_ubuntu\u90e8\u7f72springboot<\/p>\n","protected":false},"author":2,"featured_media":32875,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[117,98,103,87,914,43],"topic":[],"class_list":["post-32878","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-nginx","tag-spring-boot","tag-ubuntu","tag-87","tag-ubuntu20-4nginx","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \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\/32878.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u672c\u8282\u4ecb\u7ecd\u4e86Spring Boot\u9879\u76ee\u5728Windows\u4e0a\u8fd0\u884c\u3001\u7f16\u8bd1\u3001\u6253\u5305\u7684\u6d41\u7a0b\uff0c\u4ee5\u53ca\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684\u64cd\u4f5c\u3002_ubuntu\u90e8\u7f72springboot\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/32878.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-25T21:15:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250425211522-680bfb6ab5e9f.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=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32878.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/32878.html\",\"name\":\"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-25T21:15:26+00:00\",\"dateModified\":\"2025-04-25T21:15:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/32878.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/32878.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32878.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot\"}]},{\"@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":"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \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\/32878.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.0k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf23\u6b21\u3002\u672c\u8282\u4ecb\u7ecd\u4e86Spring Boot\u9879\u76ee\u5728Windows\u4e0a\u8fd0\u884c\u3001\u7f16\u8bd1\u3001\u6253\u5305\u7684\u6d41\u7a0b\uff0c\u4ee5\u53ca\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684\u64cd\u4f5c\u3002_ubuntu\u90e8\u7f72springboot","og_url":"https:\/\/www.wsisp.com\/helps\/32878.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-25T21:15:26+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250425211522-680bfb6ab5e9f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/32878.html","url":"https:\/\/www.wsisp.com\/helps\/32878.html","name":"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-25T21:15:26+00:00","dateModified":"2025-04-25T21:15:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/32878.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/32878.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/32878.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728Ubuntu\u4e2d\u642d\u5efaSpringboot\u670d\u52a1\u5668\u548cVite-vue\u524d\u7aef(4)-SpringBoot"}]},{"@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\/32878","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=32878"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32878\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/32875"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=32878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=32878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=32878"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=32878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}