> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/mvc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/mvc/7.-mvc/summary.md).

# Summary

프로젝트 정리

1. 요구사항 명세. 구현할 비즈니스 로직과 흐름 명확히
2. item, itemRepository 구현(+테스트)
3. 정적 리소스 HTML, CSS 먼저 구현
4. 3을 타임리프로 변환\
   상품 등록, 상품 수정 Form 페이지에서 동일한 url에서 동일한 url로 전송할 경우 th:action 값을 넣지 않으면 자동으로 현재 페이지와 동일한 url로 HTML Form 데이터를 전송한다!
5. 타임리프 문법
6. @ModelAttribute 2가지 기능\
   ① 요청 파라미터 처리\
   ② Model에 추가 : @ModelAttribute("name") : Model에 "name" 이름으로 넣어준다. 이름 생략할 경우 클래스 이름에서 첫 글자를 소문자로 바꾼 것을 이름으로 한다. @ModelAttribute 전체도 생략 가능하다.
   1. ```
      public String addItemV2(@ModelAttribute("item") Item item, Model model) {
      ```
7. POST방식 데이터 전송 후 새로고침 시 PRG(Post,Redirect,Get) 해결방법
8. RedirectAttributes 2가지 기능

   ① pathVariable로 리다이렉트할 url 뒤에 ${..}에 변수처럼 치환해서 넣을 수 있다! 치환할 변수 없으면 쿼리파라미터 형식으로 ?status=true 이렇게 들어간다!\
   ② url 인코딩
