MVC Model2

model —> service repo db
view
controller
VIEW (JSP/Thymeleaf 등)
Controller
요청 매핑(@GetMapping/@PostMapping)
요청 파라미터 → DTO 바인딩(ex. LoginRequestDTO)
1차 검증(형식/널체크), 세션·리다이렉트 결정
Service 호출, 결과를 Model에 담아 View 선택
(REST라면 ResponseEntity로 상태코드/바디 반환)
Service
UserDTO)로 만들어 Controller에 반환DAO/Repository