2016년 5월 9일 월요일

[Spring] Command 객체 vs Model 객체


  • Command Object - 폼 형식에서 instance화되어 만들어진 된 자바객체 : 주로 사용자의 정보를 담는다
    • HTTP요청 파라미터를 저장한 객체, 기본적으로 클래스 이름을 모델명으로 사용. @ModelAttribute 어노테이션을 사용하여 모델명을 설정할 수 있음
  • Model Object :사용자에게 보여줄 뷰를 만들기 위하여 필요한 것으로서, 주로 response생성시에 사용됨 
    • reference : http://www.coderanch.com/t/547052/Spring/Difference-Command-object-Model-object
    • reference: http://stackoverflow.com/questions/7583577/what-is-the-command-object-in-spring-framework
    • reference: 웹개발자를 위한 Spring 3.0 프로그래밍 - 최범균 지음- 가메출판사

댓글 없음:

댓글 쓰기