본문 바로가기
[SpringBoot]

Controller와 Service

by Hevton 2022. 11. 24.
반응형

 

 

요청과 수행을 분리한다.

 

Controller에서 요청 처리

Service에 넘겨주어서 수행

 

 

Client가 Request를 보낸다
->
Request URL에 알맞은 Controller가 수신한다
->
Controller는 넘어온 요청을 처리하기 위해 Service를 호출한다
->
Service는 알맞은 정보를 가공하여 Controller에게 데이터를 넘긴다
->
Controller는 Service의 결과물을 Client에게 전달해준다

 

 

참고 (매우 잘 정리되어 있다)

https://onlyformylittlefox.tistory.com/13

 

SpringBoot Controller, Service, DAO 이해 - Service(1)

자~!!! 오늘은 스프링에서 Service 를 알아보도록 하겠습니다!!! 제가 말주변이 없어서 최대한 알기 쉽게 작성하려고 하는데 도움이 되기를 바라면서 시작해볼게요!! 1. Service 란 무엇? 왜 필요? Contro

onlyformylittlefox.tistory.com

 

반응형

'[SpringBoot]' 카테고리의 다른 글

@RequestMapping을 사용하는 이유  (0) 2022.12.01
Controller vs RestController 어노테이션 차이  (0) 2022.12.01
DAO vs DTO vs Entity  (0) 2022.11.24
Maven VS Gradle  (0) 2022.11.23
Spring, SpringBoot 란?  (0) 2022.11.16