Spring MVC - 정적 리소스, 뷰 템플릿 경로
정적 리소스 경로 클래스패스: /src/main/resources 스프링 부트는 클래스패스의 다음 디렉토리에 있는 정적 리소스를 제공한다 /static /public /resources /META-INF/resources 예) /src/main/resources/static/basic/hello.html 에 리소스가 존재하는 경우, http://localhost:8080/basic/hello.html을 요청하면 된다. 뷰 템플릿 경로 뷰 템플릿 경로: /src/main/resources/templates @ResponseBody가 없으면 뷰 리졸버에 의해 뷰를 찾게 된다. 컨트롤러 메서드 리턴타입을 String으로 해서 뷰 논리 이름을 리턴하거나, ModelAndView 생성자의 인자로 뷰 논리 이름을 ..
2021.04.08