{"id":40165,"date":"2023-03-12T22:00:52","date_gmt":"2023-04-26T09:45:34","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/"},"modified":"2024-04-29T18:35:58","modified_gmt":"2024-04-29T10:35:58","slug":"%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/","title":{"rendered":"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f"},"content":{"rendered":"<p>\u8fd9\u662f\u5728\u5f00\u53d1Spring Boot\u5e94\u7528\u65f6\u6309\u7167\u73af\u5883\u5c06\u7f13\u5b58\u8bbe\u7f6e\u7b49\u8fdb\u884c\u5206\u79bb\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u9996\u5148\u521b\u5efa\u57fa\u4e8e\u73af\u5883\u7684application.yml\u6587\u4ef6\uff0c\u7136\u540e\u9010\u6b65\u7f16\u5199\u914d\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">touch <\/span>resources\/application-dev.yml\r\n<span class=\"nv\">$ <\/span><span class=\"nb\">touch <\/span>resources\/application-test.yml\r\n<\/code><\/pre>\n<p>\u5728\u542f\u52a8Maven\u65f6\uff0c\u53ea\u9700\u52a0\u5165\u9009\u9879\u3002<br \/>\n\u8fd9\u6837\u5c31\u53ef\u4ee5\u52a0\u8f7d\u7279\u5b9a\u73af\u5883\u7684application.yml\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>\/\/ application-dev.yml\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\r\n<span class=\"nv\">$ <\/span>maven spring-boot:run <span class=\"nt\">-Drun<\/span>.profiles<span class=\"o\">=<\/span>dev\r\n\/\/ application-test.yml\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\r\n<span class=\"nv\">$ <\/span>maven spring-boot:run <span class=\"nt\">-Drun<\/span>.profiles<span class=\"o\">=<\/span><span class=\"nb\">test<\/span>\r\n<\/code><\/pre>\n<p>SpringBoot2.0\u7684\u8fc1\u79fb\u60c5\u51b5\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$maven<\/span> spring-boot:run <span class=\"nt\">-Dspring-boot<\/span>.run.profiles<span class=\"o\">=<\/span>dev\r\n<span class=\"nv\">$maven<\/span> spring-boot:run <span class=\"nt\">-Dspring-boot<\/span>.run.profiles<span class=\"o\">=<\/span><span class=\"nb\">test<\/span>\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u5728\u5f00\u53d1Spring Boot\u5e94\u7528\u65f6\u6309\u7167\u73af\u5883\u5c06\u7f13\u5b58\u8bbe\u7f6e\u7b49\u8fdb\u884c\u5206\u79bb\u7684\u65b9\u6cd5\u3002 \u9996\u5148\u521b\u5efa\u57fa\u4e8e\u73af\u5883\u7684applicat [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40165","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u5728maven\u7684spring-boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u5728\u5f00\u53d1Spring Boot\u5e94\u7528\u65f6\u6309\u7167\u73af\u5883\u5c06\u7f13\u5b58\u8bbe\u7f6e\u7b49\u8fdb\u884c\u5206\u79bb\u7684\u65b9\u6cd5\u3002 \u9996\u5148\u521b\u5efa\u57fa\u4e8e\u73af\u5883\u7684applicat [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728maven\u7684spring-boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-26T09:45:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T10:35:58+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/\",\"name\":\"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-26T09:45:34+00:00\",\"dateModified\":\"2024-04-29T10:35:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u5728maven\u7684spring-boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f","og_description":"\u8fd9\u662f\u5728\u5f00\u53d1Spring Boot\u5e94\u7528\u65f6\u6309\u7167\u73af\u5883\u5c06\u7f13\u5b58\u8bbe\u7f6e\u7b49\u8fdb\u884c\u5206\u79bb\u7684\u65b9\u6cd5\u3002 \u9996\u5148\u521b\u5efa\u57fa\u4e8e\u73af\u5883\u7684applicat [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728maven\u7684spring-boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-26T09:45:34+00:00","article_modified_time":"2024-04-29T10:35:58+00:00","author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/","name":"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-26T09:45:34+00:00","dateModified":"2024-04-29T10:35:58+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728Maven\u7684Spring Boot\u4e2d\uff0c\u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\u542f\u52a8\u65b9\u5f0f"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8maven%e7%9a%84spring-boot%e4%b8%ad%ef%bc%8c%e6%a0%b9%e6%8d%ae%e4%b8%8d%e5%90%8c%e7%9a%84%e7%8e%af%e5%a2%83%e5%90%af%e5%8a%a8%e6%96%b9%e5%bc%8f\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40165"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40165\/revisions"}],"predecessor-version":[{"id":86944,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40165\/revisions\/86944"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}