[Spring] templates 폴더에서 index.html을 못 읽어오는 경우

Lee·2020년 7월 20일
0

Spring

목록 보기
7/7
post-thumbnail
  • 템플릿 파일을 적용하기 위해 templates 폴더 안에 html 파일을 생성한 후 controller에서 호출할 때 whiatelabel error가 발생하는 경우가 있는데 그럴 경우 application.properties 파일에 아래에 2줄을 추가해준다 (필자 기준으론 mustache)

    spring.mustache.prefix=classpath:/templates/
    spring.mustache.suffix=.html

0개의 댓글