request의 모든 값을 가져옴
UserApiRequest userApiRequest = request.getData()
request 파일엔 유저에게 받을 값
response 파일엔 DB에 저장할 값
ModelAndView: html을 불러올 수 있음
HttpServletRequest: session 쓸 때 필요
@Controller
@RequestMapping("pages") //http://localhost:8888/pages
public class PageController {
@RequestMapping(path="/cafe") //http://localhost:8888/pages/cafe
public ModelAndView cafe(){
return new ModelAndView("/cafe_index.html");
}
}
<html lang="ko"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org/">
th:fragment: html에 사용되는 태그명
<html lang="ko"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org/">
<footer th:fragment="footer">
<p>My times with Coffee</p>
</footer>
th:replace="실제 경로,파일명 :: 사용되는 태그명"
<div th:replace="cafe_head :: head"></div>