Back-End/Spring
-
스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술 (2) 스프링 웹 개발 기초Back-End/Spring 2022. 8. 14. 22:09
정적 컨텐츠 웹 개발 방법 정적 컨텐츠 MVC와 템플릿 엔진 : 서버에서 로직을 통해 html 파일 렌더링 API : 서버가 JSON 형식의 데이터를 클라이언트에게 제공하고, 클라이언트가 그 데이터를 이용해 html 파일 렌더링 정적 컨텐츠 By default, Spring Boot serves static content from a directory called /static (or /public or /resources or /META-INF/resources) resources/static 내에 있는 hello-static.html 열기 1) 웹 브라우저에서 hello-static.html 요청 2) 웹 서버가 요청을 스프링에 전달 3) controller를 탐색하다가 맵핑된 controller가 ..