728x90 contoller1 4) Spring @controller, @service, @repository 스프링은 기본적으로 레이어드 아키텍처(Layered Architecture)를 따르는데, 보통 다음 3단계로 나뉨 1. Controller(라우팅 역할) : “문 앞에서 손님을 맞이하는 안내원” 1) 클라이언트(웹/앱) 요청을 받고, 어떤 서비스가 필요할지 결정 2) 비즈니스 로직은 직접 하지 않고, Service로 위임import org.springframework.web.bind.annotation.*@RestController@RequestMapping("/users")class UserController( private val userService: UserService) { @PostMapping fun createUser(@RequestBody .. 2025. 8. 29. 이전 1 다음 728x90