--------------------footer.jsp----------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<footer th:fragment="footerFragment">
<p>copyright 2022</p>
</footer>
</html>
-------------------------header.jsp---------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="headerFragment">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title th:text="${title}"></title>
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}" />
<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
</head>
</html>
----------------------------insert.jsp-----------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>회원가입</title>
<link rel="stylesheet" type="text/css"
th:href="@{/css/bootstrap.css}" />
<script type="text/javascript"
th:src="@{/js/bootstrap.min.js}"></script>
</head>
<body>
<div style="padding:20px">
<h3>회원가입</h3>
<hr />
<form th:action="@{/member/insert}" method="post">
아이디: <input type="text" name="id"/><br />
암호: <input type="password" name="pw"/><br />
암호1: <input type="password" name="pw1" /><br />
이름: <input type="text" name="name"/><br />
나이: <input type="text" name="age"/><br />
<button type="submit" class="btn btn-primary" >회원가입</button>
</form>
</div>
</body>
</html>
--------------------login.jsp-----------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/member/header :: headerFragment}"></head>
<body>
<h3>로그인</h3>
<hr />
<form th:action="@{/member/login}" method="post">
아이디: <input type="text" name="id"/><br />
암호: <input type="password" name="pw"/><br />
<button type="submit" class="btn btn-primary" >로그인</button>
</form>
<hr />
<div th:replace="~{/member/footer :: footerFragment}"></div>
</body>
</html>
-------------------mypage.jsp-------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/member/header :: headerFragment}"></head>
<body>
<div style="padding:20px">
<h3>마이페이지</h3>
<hr />
<a th:href="@{/member/mypage?menu=1}">정보수정</a>
<a th:href="@{/member/mypage?menu=2}">암호변경</a>
<a th:href="@{/member/mypage?menu=3}">회원탈퇴</a>
<a th:href="@{/member/logout}">로그아웃</a>
<hr />
<p th:text="|${session.USERNAME}님|"></p>
<div th:if="${param.menu.toString().equals('1')}">
<h3>정보수정</h3>
<hr />
<form th:action="@{/member/mypage(menu=1)}" method="post">
아이디: <input type="text" th:value="${mem.id}" name="id" readonly /><br />
이름: <input type="text" th:value="${mem.name}" name="name"/><br />
나이: <input type="text" th:value="${mem.age}" name="age"/><br />
<button type="submit" class="btn btn-primary" >수정</button>
</form>
</div>
<div th:if="${param.menu.toString().equals('2')}">
<h3>암호변경</h3>
<hr />
<form th:action="@{/member/mypage(menu=2)}" method="post">
현재암호: <input type="password" name="pw" /><br />
바꿀암호: <input type="password" name="newPw" /><br />
바꿀암호확인: <input type="password" /><br />
<button type="submit" class="btn btn-primary" >암호변경</button>
</form>
</div>
<div th:if="${param.menu.toString().equals('3')}">
<h3>회원탈퇴</h3>
<hr />
<form th:action="@{/member/mypage(menu=3)}" method="get">
암호: <input type="password" name="pw" /><br />
<button type="submit" class="btn btn-primary" >회원탈퇴</button>
</form>
</div>
<div th:replace="~{/member/footer :: footerFragment}"></div>
</div>
</body>
</html>
--------------select.jsp------------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>회원목록</title>
<link rel="stylesheet" type="text/css"
th:href="@{/css/bootstrap.css}" />
<script type="text/javascript"
th:src="@{/js/bootstrap.min.js}"></script>
</head>
<body>
<div style="padding:20px">
<h3>회원목록</h3>
<hr />
<form th:action="@{/member/selectlist}" method="get">
<input type="hidden" name="page" value="1" />
<input type="text" name="text" placeholder="검색어" />
<input type="submit" value="검색" />
</form>
<hr />
<table class="table">
<tr>
<th>아이디</th>
<th>이름</th>
<th>나이</th>
<th></th>
</tr>
<tr th:each="tmp, idx: ${list}">
<td th:text="${tmp.id}"></td>
<td th:text="${tmp.name}"></td>
<td th:text="${tmp.age}"></td>
<td>
<a th:href="@{/member/update(id=${tmp.id})}">수정</a>
<a th:href="@{/member/delete(id=${tmp.id})}">삭제</a>
<form th:action="@{/member/delete}" method="get">
<input type="hidden" name="id" th:value="${tmp.id}" />
<input type="submit" value="삭제1" />
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
----------------update.jsp--------------
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>정보수정</title>
<link rel="stylesheet" type="text/css"
th:href="@{/css/bootstrap.css}" />
<script type="text/javascript"
th:src="@{/js/bootstrap.min.js}"></script>
</head>
<body>
<div style="padding:20px">
<h3>정보수정</h3>
<hr />
<form th:action="@{/member/update}" method="post">
아이디: <input type="text" th:value="${member.id}" name="id" readonly /><br />
이름: <input type="text" th:value="${member.name}" name="name"/><br />
나이: <input type="text" th:value="${member.age}" name="age"/><br />
<button type="submit" class="btn btn-primary" >수정</button>
</form>
</div>
</body>
</html>