MVC와 템플릿 엔진


<aside> <img src="/icons/sign-in_green.svg" alt="/icons/sign-in_green.svg" width="40px" />

설명


<aside> <img src="/icons/layers_orange.svg" alt="/icons/layers_orange.svg" width="40px" />

예시


image.png

  1. hello-mvc?name=spring!

</aside>

<aside> <img src="/icons/piano_brown.svg" alt="/icons/piano_brown.svg" width="40px" />

MVC, 템플릿 구조 이미지


image.png

  1. localhost:8080/hello-mvc를 넘기면 내장 톰켓 서버를 거침
  2. helloController에 매핑이 되어있는 걸 확인 후
  3. view에 있는 “hello-template”.html에 return
  4. Thymeleaf 템플릿 엔진 처리 후 HTML로 변환하여 출력 </aside>