처음 만드는 Java Spring + Oracle 회원관리 미니실습노트

edit.html

· 1 views

이제 클릭한 회원의 정보를 볼 수 있는 화면 코드를 작성합니다.
관리자가 특정 회원의 상세 정보를 확인하고 필요하면 권한을 바꿀 수 있는 기능을 만듭니다.
우선 조회 기능만 구현하고 수정과 삭제는 뒤에서 추가합니다.

src/main/resources/templates 폴더에서 우클릭 → New → HTML File → edit.html을 선택합니다.
생성된 edit.html에 아래 코드를 입력합니다.

▼ Code

Path: templates/edit.h​tml

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>회원 정보</title>
</head>
<body>
<h2>회원 정보</h2>
<table border="1" cellpadding="5">
    <tr>
        <th>ID</th>
        <td th:text="${member.id​}"></td>
    </tr>
    <tr>
        <th>이름</th>
        <td th:text="${member.na​me}"></td>
    </tr>
    <tr>
        <th>이메일</th>
        <td th:text="${member.em​ail}"></td>
    </tr>
    <tr>
        <th>권한</th>
        <td th:text="${member.ro​le}"></td>
    </tr>
</table>
<br>
<button type="button" onclick="location.hr​ef='/members'">목록</b​utton>
</body>
</html>

댓글

아직 댓글이 없습니다.