Lifesoft

home.html

코드 1
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>홈</title>
</head>
<body>
  <h2>환영합니다</h2>

  <p th:if="${session.loginId != null}" 
     th:text="'안녕하세요, ' + ${session.loginId} + '님!'"></p>

  <p th:if="${session.role == 'ADMIN'}">
    <a href="/members">회원 리스트</a>
  </p>

  <p th:if="${session.loginId != null}">
    <button type="button" onclick="location.href='/logout'">로그아웃</button>
  </p>

  <p th:if="${session.loginId == null}">
    <button type="button" onclick="location.href='/login'">로그인</button>
  </p>
</body>
</html>