정적 컨텐츠 다루기

최태양 (choittttt)·2023년 11월 29일

스프링 정복하기

목록 보기
4/11
post-thumbnail

출처 : 김영한

정적 컨텐츠

static 폴더 안에 있는 hello-static.html을 url로 요청시

localhost:8080/hello-static.html

  1. 내장된 톰켓 서버가 요청을 위 명령을 받은 뒤 스프링 컨테이너에 넘긴다.
  2. 먼저 Controller 쪽에 hello-static이 있는지 확인한다. (Controller에 우선순위가 있다)
  3. 2번에서 Controller에 hello-static이 존재하지 않으면 resources:static/ 폴더에서 찾아서 반환해준다.
profile
Better Than Yesterday

0개의 댓글