Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20210502] @RequestBody, @ModelAttribute #114

Open
JuHyun419 opened this issue May 2, 2021 · 0 comments
Open

[20210502] @RequestBody, @ModelAttribute #114

JuHyun419 opened this issue May 2, 2021 · 0 comments
Labels

Comments

@JuHyun419
Copy link
Owner

@RequestBody

  • Request의 본문(Body)에 Json이나 xml 값으로 요청을 하여 HttpMessageConverter을 반드시 거쳐 DTO객체에 맞는 타입으로 바꿔서 바인딩을 시켜줌
  • RequestBody에는 기본 생성자(NoArgsConstructor)이 필요함
  • Setter는 필수는 아님

@ModelAttribute

  • 파라미터 값으로 DTO 객체에 바인딩을 하는 방식
  • Setter 메서드가 반드시 있어야 함

https://dionysus2074.tistory.com/172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant