

static → 정적페이지
templates → 동적페이지

return "mappingResult";
컨트롤러 메소드는 String(뷰 이름)을 반환
DispatcherServlet은 이 문자열을 받아서 → ViewResolver를 통해 templates/mappingResult.html 파일을 찾아서 실행
이 과정이 포워딩(forwarding)
(리다이렉트가 아니고, 서버 내부에서 템플릿 파일을 찾아서 응답으로 만들어줌)

templates을 뒤져서 mappingresult (페이지이름)
ViewResolver(기본: ThymeleafViewResolver)가 아래 규칙으로 실제 파일을 찾음:

classpath:/templates/
classpath: → resources폴더.htmltemplates/mappingResult.html 로 포워딩해서 렌더링⇒ 서블릿은 매 요청마다 서블릿을 만들었지만 컨트롤러는 도메인별 컨트롤러로 메소드를 여러개