SpringBoot
网盘
Spring Boot 中文文档 (springdoc.cn)
🍍入门
- 创建Maven工程
- 导入spring-boot-stater-web起步依赖
- 编写
Controller
@RestController
public class HelloController {
@RequestMapping("/hello")
public String hello(){
System.out.println("Hello World ~");
return "hello World ~";
}
}
- 提供一个启动类
@SpringBootApplication
public class SpringbootStartApplication {
public static void main(string[] args) {
SpringApplication.run(SpringbootStartApplication.class,args);
}
}