경로지정
<시작태그 th:href="@{일반경로}" >
<시작태그 th:href="@{상대경로}" >
<시작태그 th:href="@{/절대경로}" >
파라미터 전달
<시작태그 th:href="@{일반경로}" >
@RequestParam("변수") 데이터타입 변수명
css
<link rel="stylesheet" type="text/css" th:href="@{css/test.css}" >
src/main/resources
- static 폴더 (생성)
- css 폴더 (생성)
- *.css
submit
<form th:action="@{경로}" >
<inputth:value="${값}" > //초기값 설정
<input th:value="@{변수.값}" > //값 얻어오기
이미지
<img th:src="@{이미지경로.확장자}" width=" " height=" " />
변수 사용
<시작태그 th:with="변수=${설정값}" >
<시작태그 th:text="${변수}" >
fragment 공통영역처리
공통영역을 조각화 하여 분리할 수 있다.
<시작태그 th:fragment="조각명" >
<시작태그 th:replace="템플릿 조각 경로 :: 조각명" >