----------------insertbatch.jsp------------------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/admin/header :: headerFragment}"></head>
<body>
<div style="padding:20px">
<h3>도서 일괄 등록</h3>
<hr />
<form th:action="@{/admin/insertbatch}" method="post">
<table class="table">
<tr>
<th>제목</th>
<th>가격</th>
<th>저자</th>
<th>분류</th>
</tr>
<tr th:each="i:${#numbers.sequence(1,2)}">
<td><input type="text" name="title" /></td>
<td><input type="text" name="price"/></td>
<td><input type="text" name="writer"/></td>
<td>
<select name="category">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</td>
</tr>
</table>
<button type="submit" class="btn btn-primary" >등록</button>
</form>
</div>
<div th:replace="~{/admin/footer :: footerFragment}"></div>
</body>
</html>
---------------------------selectlist.jsp-----------------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/admin/header :: headerFragment}"></head>
<body>
<div style="padding:20px">
<h3>도서목록</h3>
<hr />
<a th:href="@{/admin/insertbatch}">도서등록</a>
<form th:action="@{/admin/selectlist}" method="get">
<input type="hidden" name="page" value="1" />
<input type="text" name="text" placeholder="검색어" />
<input type="submit" value="검색" />
</form>
<hr />
<form th:action="@{/admin/action}" method="post">
<input type="submit" name="btn" value="일괄삭제" />
<input type="submit" name="btn" value="일괄수정" />
<table class="table table-sm">
<tr>
<th></th>
<th>번호</th>
<th>도서번호</th>
<th>도서명</th>
<th>도서가격</th>
<th>글쓴이</th>
<th>분류</th>
<th>등록일</th>
</tr>
<tr th:each="tmp, idx: ${list}">
<td><input type="checkbox" name="chk" th:value="${tmp.code}"></td>
<td th:text="${idx.count}"></td>
<td th:text="${tmp.code}"></td>
<td th:text="${tmp.title}"></td>
<td th:text="${tmp.price}"></td>
<td th:text="${tmp.writer}"></td>
<td th:text="${tmp.category}"></td>
<td th:text="${tmp.regdate}"></td>
</tr>
</table>
</form>
<th:block th:each="i : ${#numbers.sequence(1,pages)}">
<a th:href="@{/admin/selectlist(page=${i}, text=${param.text})}"
th:text="${i}"></a>
</th:block>
<div th:replace="~{/admin/footer :: footerFragment}"></div>
</body>
</html>
-----------------------------updatebatch.jsp-----------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/admin/header :: headerFragment}"></head>
<body>
<div style="padding:20px">
<h3>도서일괄수정</h3>
<form th:action="@{/admin/updatebatch}" method="post">
<table class="table table-sm">
<tr>
<th></th>
<th>도서번호</th>
<th>도서명</th>
<th>도서가격</th>
<th>글쓴이</th>
<th>분류</th>
<th>등록일</th>
</tr>
<tr th:each="tmp, idx: ${list}">
<td><input type="text" th:value="${tmp.code}" name="code" readonly /></td>
<td><input type="text" th:value="${tmp.title}" name="title" /></td>
<td><input type="text" th:value="${tmp.price}" name="price" /></td>
<td><input type="text" th:value="${tmp.writer}" name="writer" /></td>
<td>
<select name="category">
<option th:selected="${tmp.category == 'A'}">A</option>
<option th:selected="${tmp.category == 'B'}">B</option>
<option th:selected="${tmp.category == 'C'}">C</option>
</select>
</td>
<td th:text="${tmp.regdate}"></td>
</tr>
</table>
<input type="submit" name="btn" value="일괄수정" />
</form>
<div th:replace="~{/admin/footer :: footerFragment}"></div>
</body>
</html>