IDEA创建工作空间及SpringBoot项目(更改工作空间在最底下):
1、如果是第一次进入IDEA,在这个页面选择create new project;
然后就是选择工作空间的位置和命名
2、切记:
1)IDEA里的project相当于eclipse的wordspace
2)IDEA里的model 相当于eclipse的project
所以在第一步完成之后就是创建New Modle,即想创建的项目。以后想创建新的项目,直接在Project Structure添加新Modle即可。
3、选择Spring Initialize(开始创建SpingBoot项目)
1) Group 、Package中填总包名的前缀,如com.fxy
2) Artifact 中填项目名
使用start.spring.io创建springboot项目方法:点击打开链接
4、暂时只选web
然后就是项目位置存放了
5、测试项目是否配置成功,添加一个class,执行
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
public class HelloController {@RequestMapping("/hello")public String hello() {return "hello,this is a springboot demo";}
}
更改IDEA工作空间,使得每次进入IDEA都可以选择新的:在IDEA里ctrl + alt + s,选择Reopen last project on startup