IDE项目中快速搭建spring boot项目

  1. 新建项目,选择spring initializr

    IDE项目中快速搭建spring boot项目

   2. 点击下一步,如下

IDE项目中快速搭建spring boot项目

3.点击下一步,选择web,可自行选择springboot版本

IDE项目中快速搭建spring boot项目

4.点击下一步,会自动生成项目名,直接点击完成,项目就建好了

IDE项目中快速搭建spring boot项目

5.项目生成如图,需要注意的是spring boot的应用程序启动后,controller需要放在其同层级包下或其子包下,才能被访问到

IDE项目中快速搭建spring boot项目

6.直接main方法运行程序,boot项目启动,方便快捷,不需要再进行配置

IDE项目中快速搭建spring boot项目