Dispatch Servlet, Handler Mapping, Handler Adapter는 Spring이 제공하는 영역
Controller, Service, Repository는 사용자가 만드는 Application Code
클라이언트(Client)는 Dispatch Servlet에 요청(Request)을 보낸다.
Request = HTTP(s) + Method (GET, POST, PUT, PATCH, DELETE) + URL + JSON Data
Web Layer 동작과정과 동일
Controller로부터 DTO 또는 자료형을 넘겨받는다.
비즈니스 로직을 수행하고, Domain Model(Entity, Domain Service)을 Service Layer로 보낸다.
Repository로부터 Entity를 받는다.
Controller에게 응답(Response)한다. ※ Controller에게 DTO를 보낸다.
Service로부터 DTO를 받는다.
Handler Adapter에게 Response를 보낸다. ※ DTO를 보낸다.