강의

멘토링

커뮤니티

Inflearn Community Q&A

sloth's profile image
sloth

asked

Real-world! Spring Boot and JPA Utilization 1 - Web Application Development

Change Detection and Merge

파라미터 관련 질문이 있습니다.

Written on

·

192

0

controller에서 service로 넘길때나 dto로 넘길때 

파라미터를 하나하나 넘겨야 할 이유가 있나요??

itemService.updateItem(itemId, form)

이런식으로 한번에 넘겨서 서비스단이나 change메서드를 엔티티단에서 만들면 거기서 하나씩 분리하면 안되는 이유가 있을까요?

웹앱springJPAspring-bootjava

Answer 1

0

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 레완님

네 그렇게 진행하셔도 됩니다.

대신에 form은 컨트롤러에서만 사용하는 용도로 만든 객체이니, 다른 객체를 하나 만드셔서 사용하는 것을 권장합니다.

감사합니다.

sloth's profile image
sloth

asked

Ask a question