김찬진의 개발 블로그

23/02/14 [Spring 동작 순서] 본문

1일1배움/Spring (김영한 님)

23/02/14 [Spring 동작 순서]

kim chan jin 2023. 2. 14. 16:15

1. client에서 url(localhost:8080/hello-static)요청

2. 내장톰캣서버(WAS=Web Server+Wep Application)가 Spring Container 내에 해당 url(hello-static)을 처리하는(url과 매핑되어 있는) Controller객체(Spring Bean)가 있는지 확인

3. 내장톰캣서버가 해당 url을 처리하는 Controller객체(@GetMapping("hello-static"))가 있음을 판단하면 그 객체의 반환값을 뷰리졸버가 받아서 (변환하고) template폴더 내의 hello-static.html을 찾아서 client에게 보냄

4. 내장톰캣서버가 Controller객체가 없음을 판단하면 static폴더 내의 hello-static.html을 찾아서 client에게 보냄

Comments