-
Command 객체공부/SpringBoot & Spring 2021. 10. 26. 23:52728x90
Command 객체란 HttpServletRequest를 통해 들어온 RequestParameter들을 setter method를 이용하여 Object에 정의되어있는 속성에 Binding이 되는 Object를 의미한다.
Command 객체는 보통 VO나 DTO를 의미하며, HttpServletRequest 로 받아오는RequestParameter의 key 값과 동일한 이름의 속성들과 setter method를 가지고 있어야 한다.
Binding방식은 Spring이 내부적으로 HttpServletRequest 와 Command Object의 setter method를 이용하여 자동 Binding을 시켜준다.
Command 객체의 이름을 변경하고 싶을 때 @ModelAttribute와 같이 사용..?
728x90'공부 > SpringBoot & Spring' 카테고리의 다른 글
SpringBoot 오류 (0) 2021.11.09 인텔리제이 오류 plugin (0) 2021.11.09 Mybatis의 장점 (0) 2021.10.26 AOP 어드바이스(Advice) 종류 / 실행 (0) 2021.10.08 Error: Could not find or load main class (0) 2021.10.08