Spring Boot REST API 빠르게 시작하기
프로젝트 구조
src/main/java/com/example/
├── controller/
├── service/
├── repository/
└── entity/
기본 Controller 예제
@RestController
@RequestMapping("/api/users")
public class UserController {
@GetMapping
public List<User> getAll() {
return userService.findAll();
}
}