如何在IntelliJ IDEA中创建Spring Maven项目 [英] How to create spring maven project in intellij IDEA
问题描述
我正在尝试在IntelliJ IDEA中创建spring + maven项目.我已阅读这些官方Wiki ,但是当我完成步骤时,我的项目中没有Maven.我已经尝试过用手添加它,但是看来我的手还不够好:(,因为Maven依赖项,lib文件夹和类想让自己过着自己的生活(依赖项不在lib文件夹,我尝试从依赖项键入类,没有自动完成功能).有人有循序渐进的指南或链接吗?
I'm trying to create spring + maven project in IntelliJ IDEA. I've read these official wiki, but when I finish steps, there is no maven in my project. I've tried to add it with my hands, but it seems, that I have hands not so good enough :(, because maven dependencies, lib folder and classes, that I want to use live their own lives (dependencies aren't in lib folder and I try to type classes from dependencies, there is no auto-complete). Does anyone has step-by-step guide or link?
推荐答案
转到 https://start.spring.io ,并让Initializr为您生成具有所需依赖项的Maven项目.
Go to https://start.spring.io and let the Initializr generate a Maven project for you with the desired dependencies.
您将获得一个zip文件,然后可以将其解压缩到dev文件夹中.
You will get a zip file which you can then unpack in your dev folder.
然后打开Intellij并选择File | File.新增|现有资源中的项目.(或从欢迎屏幕导入项目.)
Then open Intellij and select File | New | Project from Existing Sources. (Or Import Project from the welcome screen).
选择解压缩的文件夹,然后按照向导进行操作,在出现提示时选择Maven.
Select your unzipped folder, and then follow the wizard, selecting Maven when you are prompted to.
请参阅此处: https://www.jetbrains.com/help/idea/2016.2/importing-project-from-maven-model.html
这篇关于如何在IntelliJ IDEA中创建Spring Maven项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!