[Spring]5. welcome page 만들기(2)

최혜원·2024년 2월 5일

Spring

목록 보기
5/9

** welcome page에서 제공하는 기능이 매우 많으니, spring에서 제공하는 기능들을 활용해보자

step1) spring.io 에 들어가서 projects - springboot 클릭

step2) LEARN - 맨 위에 current version의 Reference Doc. - web - 해당 페이지 내에서 welcome 검색

Spring Boot supports both static and templated welcome pages. It first looks for an index.html file in the configured static content locations. If one is not found, it then looks for an index template. If either is found, it is automatically used as the welcome page of the application.

그러나 알다시피, 이것은 단순히 정적으로 결과를 출력하는 것이지(즉, 웹서버가 웹브라우저에 넘겨주는 것 뿐) 동적으로 프로그래밍 했다고 볼 수 없다.

step3) 템플릿 엔진을 사용하면, 원하는 대로 루프를 넣는 등 다양하게 활용이 가능하다

  • 우리가 쓰는 template engine : tymeleaf
profile
공부하자

0개의 댓글