原文出处

 

第一步
选择File –> New –> Project –>Spring Initialer –> 点击Next

Intellij IDEA 搭建Spring Boot项目(一)


第二步
自己修改 Group 和 Artifact 字段名 –>点击next

Intellij IDEA 搭建Spring Boot项目(一)

 

第三步

Intellij IDEA 搭建Spring Boot项目(一)

 

第四步
点击finish

Intellij IDEA 搭建Spring Boot项目(一)

 

第五步
等待编译完成(这个貌似FQ会好点,要不然下载依赖特别慢。。。)

第六步

Intellij IDEA 搭建Spring Boot项目(一)

 


第七步(最终目录结构)

Intellij IDEA 搭建Spring Boot项目(一)


第八步
显示hello world
我们需要编辑一个HelloController类用于转发链接

@RestController
@EnableAutoConfiguration
public class HelloController {

    @RequestMapping("/hello")
    private String index(){
        return "Hello World!";
    }
}


第九步
启动项目

方式一

Intellij IDEA 搭建Spring Boot项目(一)

 

方式二

Intellij IDEA 搭建Spring Boot项目(一)


启动之后可以看控制台显示的是如下:

Intellij IDEA 搭建Spring Boot项目(一)


见证奇迹的时刻

我们在游览器中输入如下的http://localhost:8080/hello –>显示的如下界面代表我们项目成功了

Intellij IDEA 搭建Spring Boot项目(一)

 

相关文章: