新建Spring Boot项目

使用IDEA集成Spring Initializr
新建项目

项目配置

引入依赖


创建测试接口
@RestController
public class ParaController {
@GetMapping({"/firstRequest", "/"})
public Map firstRequest() {
Map<String, Object> result = new HashMap<>();
result.put("code", 0);
result.put("msg", "第一个接口");
return result;
}
}
https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.3.10.RELEASE&packaging=jar&jvmVersion=1.8&groupId=top.xiongmingcai&artifactId=spring-boot-learn&name=spring-boot-learn&description=Demo%20project%20for%20Spring%20Boot&packageName=top.xiongmingcai.spring-boot-learn&dependencies=web,web
IDEA创建springboot项目总是创建失败问题的解决
https://start.aliyun.com