7.c8b0ee6b.js 5.0 KB
Newer Older
茶陵後's avatar
茶陵後 已提交
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{419:function(e,t,r){e.exports=r.p+"assets/img/spring_guide_welcome_import.2c67480c.png"},420:function(e,t,r){e.exports=r.p+"assets/img/spring_guide_select_gradle_file.0235a6f6.png"},421:function(e,t,r){e.exports=r.p+"assets/img/spring_guide_new_project.e8c75b2f.png"},789:function(e,t,r){"use strict";r.r(t);var a=r(56),i=Object(a.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"working-a-getting-started-guide-with-intellij-idea"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#working-a-getting-started-guide-with-intellij-idea"}},[e._v("#")]),e._v(" Working a Getting Started guide with IntelliJ IDEA")]),e._v(" "),a("p",[e._v("This guide walks you through using IntelliJ IDEA to build one of the Getting Started guides.")]),e._v(" "),a("h2",{attrs:{id:"what-you-ll-build"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#what-you-ll-build"}},[e._v("#")]),e._v(" What you’ll build")]),e._v(" "),a("p",[e._v("You’ll pick a Spring guide and import it into IntelliJ IDEA. Then you can read the guide, work on the code, and run the project.")]),e._v(" "),a("h2",{attrs:{id:"what-you-ll-need"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#what-you-ll-need"}},[e._v("#")]),e._v(" What you’ll need")]),e._v(" "),a("ul",[a("li",[e._v("About 15 minutes")]),e._v(" "),a("li",[a("a",{attrs:{href:"https://www.jetbrains.com/idea/download/",target:"_blank",rel:"noopener noreferrer"}},[e._v("IntelliJ IDEA"),a("OutboundLink")],1)]),e._v(" "),a("li",[a("a",{attrs:{href:"http://www.oracle.com/technetwork/java/javase/downloads/index.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("JDK 6"),a("OutboundLink")],1),e._v(" or later")])]),e._v(" "),a("h2",{attrs:{id:"installing-intellij-idea"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installing-intellij-idea"}},[e._v("#")]),e._v(" Installing IntelliJ IDEA")]),e._v(" "),a("p",[e._v("If you don’t have IntelliJ IDEA (Ultimate Edition) installed yet, visit the link up above. From there, you can download a copy for your platform. To install it simply unpack the downloaded archive.")]),e._v(" "),a("p",[e._v("When you’re done, go ahead and launch IntelliJ IDEA.")]),e._v(" "),a("h2",{attrs:{id:"importing-a-getting-started-guide"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#importing-a-getting-started-guide"}},[e._v("#")]),e._v(" Importing a Getting Started guide")]),e._v(" "),a("p",[e._v("To import an existing project you need some code, so clone or copy one of the Getting Started guides, e.g. the "),a("a",{attrs:{href:"https://spring.io/guides/gs/rest-service/",target:"_blank",rel:"noopener noreferrer"}},[e._v("REST Service"),a("OutboundLink")],1),e._v(" guide:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("$ git clone https://github.com/spring-guides/gs-rest-service.gitCOPY\n")])])]),a("p",[e._v("With IntelliJ IDEA up and running, click "),a("strong",[e._v("Import Project")]),e._v(" on the "),a("strong",[e._v("Welcome Screen")]),e._v(", or "),a("strong",[e._v("File | Open")]),e._v(" on the main menu:")]),e._v(" "),a("p",[a("img",{attrs:{src:r(419),alt:"spring_guide_welcome_import"}})]),e._v(" "),a("p",[e._v("In the pop-up dialog make sure to select either "),a("a",{attrs:{href:"https://spring.io/guides/gs/maven",target:"_blank",rel:"noopener noreferrer"}},[e._v("Maven"),a("OutboundLink")],1),e._v("'s "),a("strong",[e._v("pom.xml")]),e._v(" or "),a("a",{attrs:{href:"https://spring.io/guides/gs/gradle",target:"_blank",rel:"noopener noreferrer"}},[e._v("Gradle"),a("OutboundLink")],1),e._v("'s "),a("strong",[e._v("build.gradle")]),e._v(" file under the "),a("strong",[e._v("complete")]),e._v(" folder:")]),e._v(" "),a("p",[a("img",{attrs:{src:r(420),alt:"spring_guide_select_gradle_file"}})]),e._v(" "),a("p",[e._v("IntelliJ IDEA will create a project with all the code from the guide ready to run.")]),e._v(" "),a("h2",{attrs:{id:"creating-a-project-from-scratch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-project-from-scratch"}},[e._v("#")]),e._v(" Creating a Project from Scratch")]),e._v(" "),a("p",[e._v("In case you’d like to start with an empty project and copy-and-paste your way through the guide, create a new "),a("strong",[e._v("Maven")]),e._v(" or "),a("strong",[e._v("Gradle")]),e._v(" project in the "),a("strong",[e._v("Project Wizard")]),e._v(":")]),e._v(" "),a("p",[a("img",{attrs:{src:r(421),alt:"spring_guide_new_project"}})]),e._v(" "),a("h2",{attrs:{id:"see-also"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#see-also"}},[e._v("#")]),e._v(" See Also")]),e._v(" "),a("p",[e._v("The following guide may also be helpful:")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://spring.io/guides/gs/sts/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Working a Getting Started guide with STS"),a("OutboundLink")],1)])]),e._v(" "),a("p",[e._v("原文链接: https://spring.io/guides/gs/intellij-idea/")])])}),[],!1,null,null,null);t.default=i.exports}}]);