[Spring] 2_2. 스프링 웹 개발 기초
·
BE/SpringBoot
정적컨텐츠웹 브라우저에서 localhost:8080/hello-static.html이라는 요청이 들어오면 스프링부트에서 우선1. 스프링 컨테이너에 hello-static 관련한 컨트롤러가 있는지 확인한다.2. 없을 경우 resource 폴더 안에 있는 static/hello-static.html라는 정적 컨텐츠를 웹 브라우저에 띄운다. MVC와 템플릿 엔진🏷️ MVC: Model, View, Controller@GetMapping("hello-mvc") public String helloMvc(@RequestParam("name") String name, Model model){ model.addAttribute("name", name); return "hello-temp..