{"id":40175,"date":"2023-10-03T05:29:31","date_gmt":"2023-03-24T12:58:08","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/"},"modified":"2024-01-15T10:31:38","modified_gmt":"2024-01-15T02:31:38","slug":"%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/","title":{"rendered":"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u60f3\u8981\u4f7f\u7528Spring Boot CLI\u8fd0\u884cGroovy\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c<br \/>\n\u88ab&#8221;Ruby Gem&#8221;\u7684&#8221;Spring&#8221;\u6240\u5e72\u6270\uff0c<br \/>\n\u5bfc\u81f4\u65e0\u6cd5\u4f7f\u7528Spring Boot CLI\u7684\u547d\u4ee4&#8221;spring run&#8221;\uff0c<br \/>\n\u56e0\u6b64\u5c06\u89e3\u51b3\u65b9\u6848\u8bb0\u4e0b\u6765\u3002<\/p>\n<h1>\u89e3\u51b3\u65b9\u6cd5<\/h1>\n<h2>1. \u8981\u5c06Spring Boot CLI\u7684\u8def\u5f84\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d<\/h2>\n<p>\u8bf7\u5728.zshrc\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u7684\u4e24\u884c\uff08\u6839\u636e\u60a8\u7684\u73af\u5883\u5c06.zshrc\u8f6c\u6362\u4e3a.bashrc\u7b49\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>export SPRING_HOME=\/Users\/Y_h\/spring-1.5.6.RELEASE\r\nexport PATH=$SPRING_HOME\/bin\/:$PATH\r\n<\/code><\/pre>\n<p>\u5237\u65b0\u66f4\u6539\u5c06\u901a\u8fc7 source ~\/.zshrc \u5728 zsh \u914d\u7f6e\u6587\u4ef6\u4e2d\u751f\u6548\u3002<\/p>\n<h2>2. \u8fdb\u884c Spring Boot CLI \u7684\u64cd\u4f5c\u9a8c\u8bc1<\/h2>\n<pre class=\"post-pre\"><code>$ spring\r\n<\/code><\/pre>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165&#8230;<\/p>\n<pre class=\"post-pre\"><code>usage: spring [--help] [--version]\r\n       &lt;command&gt; [&lt;args&gt;]\r\n\r\nAvailable commands are:\r\n\r\n  run [options] &lt;files&gt; [--] [args]\r\n    Run a spring groovy script\r\n\r\n  test [options] &lt;files&gt; [--] [args]\r\n    Run a spring groovy script test\r\n\r\n  grab\r\n    Download a spring groovy script's dependencies to .\/repository\r\n\r\n  jar [options] &lt;jar-name&gt; &lt;files&gt;\r\n    Create a self-contained executable jar file from a Spring Groovy script\r\n\r\n  war [options] &lt;war-name&gt; &lt;files&gt;\r\n    Create a self-contained executable war file from a Spring Groovy script\r\n\r\n  install [options] &lt;coordinates&gt;\r\n    Install dependencies to the lib\/ext directory\r\n\r\n  uninstall [options] &lt;coordinates&gt;\r\n    Uninstall dependencies from the lib\/ext directory\r\n\r\n  init [options] [location]\r\n    Initialize a new project using Spring Initializr (start.spring.io)\r\n\r\n  shell\r\n    Start a nested shell\r\n\r\nCommon options:\r\n\r\n  -d, --debug Verbose mode\r\n    Print additional status information for the command you are running\r\n\r\n\r\nSee 'spring help &lt;command&gt;' for more information on a specific command.\r\n<\/code><\/pre>\n<p>\u5982\u679c\u663e\u793a\u51fa\u6765\uff0c\u5c31\u6ca1\u95ee\u9898\u4e86<br \/>\n\u8f9b\u82e6\u4e86\uff0c\u81ea\u5df1<\/p>\n<h1>\u6700\u5f8c<\/h1>\n<p>\u53ea\u8981\u4ed4\u7ec6\u770b\u5b89\u88c5\u6307\u5357\u4e0a\u5199\u7684\uff0c\u6211\u5c31\u9677\u5165\u4e86\u56f0\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u60f3\u8981\u4f7f\u7528Spring Boot CLI\u8fd0\u884cGroovy\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c \u88ab&#8221;Ruby Gem&#038;# [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40175","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>\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270 - 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\/\u5728\u5b89\u88c5spring-boot-cli\u65f6\uff0c\u53d7\u5230\u4e86ruby\u7684\u5e72\u6270\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u60f3\u8981\u4f7f\u7528Spring Boot CLI\u8fd0\u884cGroovy\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c \u88ab&#8221;Ruby Gem&amp;# [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5spring-boot-cli\u65f6\uff0c\u53d7\u5230\u4e86ruby\u7684\u5e72\u6270\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-24T12:58:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T02:31:38+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\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.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/\",\"name\":\"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-24T12:58:08+00:00\",\"dateModified\":\"2024-01-15T02:31:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270\"}]},{\"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270 - 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\/\u5728\u5b89\u88c5spring-boot-cli\u65f6\uff0c\u53d7\u5230\u4e86ruby\u7684\u5e72\u6270\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270","og_description":"\u9996\u5148 \u60f3\u8981\u4f7f\u7528Spring Boot CLI\u8fd0\u884cGroovy\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c \u88ab&#8221;Ruby Gem&# [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5b89\u88c5spring-boot-cli\u65f6\uff0c\u53d7\u5230\u4e86ruby\u7684\u5e72\u6270\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-24T12:58:08+00:00","article_modified_time":"2024-01-15T02:31:38+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/","name":"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-24T12:58:08+00:00","dateModified":"2024-01-15T02:31:38+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728\u5b89\u88c5Spring Boot CLI\u65f6\uff0c\u53d7\u5230\u4e86Ruby\u7684\u5e72\u6270"}]},{"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%ae%89%e8%a3%85spring-boot-cli%e6%97%b6%ef%bc%8c%e5%8f%97%e5%88%b0%e4%ba%86ruby%e7%9a%84%e5%b9%b2%e6%89%b0%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40175","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40175"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40175\/revisions"}],"predecessor-version":[{"id":58649,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40175\/revisions\/58649"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}