一、SpringBoot简介
通过Spring Boot,可以轻松地创建独立,基于生产级别,基于Spring的应用程序,并且可以 “运行”它们。
其实Spring Boot 的设计是为了让你尽可能快的跑起来 Spring 应用程序并且尽可能减少你的配置文件。
1,SpringBoot工程入门案例开发步骤
(1)创建新模块,选择Spring初始化,并配置模块相关基础信息,选择当前模块需要使用的技术集
(3)创建 控制器类
@RestController
@RequestMapping("/tests")
public class TestController {
@GetMapping("/{id}")
public String getById(@PathVariable Integer id) {
System.out.println("id ==> " + id);
return "hello , spring boot! ";
}
}
(4)运行自动生成的Application类
(5)使用Postman进行测试