반응형 MVC1 [TIL] SpringMVC동작이해 static폴더에 존재하던 hello.html이 나오지 않다가 어떻게 위처럼 templates에 복사본 하나를 두었다고 출력이 되는 것일까? @GetMapping("/html/templates") public String htmlTemplates() { return "hello"; } 타임리프 default 설정 - prefix : classpath:/templates/ - suffix: .html resources/templates/hello.html hello가 들어오면 resources의 templates에서 찾는데 view name이 hello자리에 들어가고 view name 뒤에 html을 붙여서 찾는다.이것이 타임리프 default설정인데 폴더나 뒤에붙는 html을 바꿀 수 있다 다시한번 정리.. 2022. 8. 4. 이전 1 다음 반응형