소개
스스로 온전하라
게시글
질문&답변
2020.01.28
@ModelAttribute에 관한 설명에 대한 질문이 있습니다.
어.. 그럼 정리하면 @ModelAttribute는 Simple한 값이 아니면 기본적으로 붙고 모델 객체의 속성으로 해당 객체를 넣어주는 어노테이션이다. 맞을까요?
- 0
- 6
- 366
질문&답변
2020.01.28
@ModelAttribute에 관한 설명에 대한 질문이 있습니다.
더 아래로 가보면 After the model attribute instance is obtained, data binding is applied. The WebDataBinder class matches Servlet request parameter names (query parameters and form fields) to field names on the target Object . Matching fields are populated after type conversion is applied, where necessary. For more on data binding (and validation), see Validation . For more on customizing data binding, see DataBinder . 라고 되어있고 @ModelAttribute가 없어도 WebDataBinder 를 통해 파라미터가 매핑되고 @ModelAttribute는 정확히는 파라미터가 매핑된 객체를 모델 객체의 속성에 넣어주는것. 맞나요? @ModelAttribute를 사용하지않아도 데이터는 객체로 바인딩 되는것을 확인했습니다.
- 0
- 6
- 366
질문&답변
2020.01.28
@ModelAttribute에 관한 설명에 대한 질문이 있습니다.
기선님 혹시 죄송한데 관련된 자료 부탁드려도 괜찮을까요? 레퍼런스 에서 조금 유사한 내용이 있기는 한데.. 그건 모델(Model클래스 )을 객체화 한다는것으로 이해했습니다. @ModelAttribute의 주석에서도 비슷한 내용은 못찾아서...
- 0
- 6
- 366
질문&답변
2020.01.06
모델에 관해 질문 있습니다.
명쾌한 답변 감사합니다!
- 0
- 2
- 146