Spring Security Html 2022/04/05

파일명 security/home.html

<!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>security_home</title>
</head>

<body style="padding: 10px;">
    <h3>security_home 페이지 입니다.</h3>

    <hr />    
    <div style="padding: 20px;">
        <div th:if="${user == null}">
            <h3>로그인전</h3>
            <a th:href="@{member/security_login}">로그인</a>
            <a th:href="@{member/security_join}">회원가입</a>
        </div>
        <hr />
        <div th:if="${user != null}">
            <h3>로그인후</h3>
            <form th:action="@{/member/security_logout}" method="post">
                <input type="submit" value="로그아웃" />
            </form>
            <a th:href="@{security_admin/home}">관리자 홈</a>
            <a th:href="@{security_seller/home}">판매자 홈</a>
            <a th:href="@{security_customer/home}">고객 홈</a>
        </div>
    </div>    

</body>
</html>

파일명 security/join.html

<!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>security_join</title>
</head>

<body style="padding: 10px;">
    <h3>security_join 페이지 입니다.</h3>

    <hr />

    <div style="padding: 20px;">        
        <form th:action="@{/member/security_join}" method="post"> 
            <label style="width:75px; height: 30px; display:inline-block;">이메일 : </label>
            <input type="text" placeholder="이메일" name="uemail"/></br>

            <label style="width:75px; height: 30px; display:inline-block;">암호 : </label>
            <input type="password" placeholder="암호" name="upw"/></br>

            <label style="width:75px; height: 30px; display:inline-block;">암호확인 : </label>
            <input type="password" placeholder="암호확인" name="upw1"/></br>

            <label style="width:75px; height: 30px; display:inline-block;">이름 : </label>
            <input type="text" placeholder="이름" name="uname"/></br>

            <label style="width:75px; height: 30px; display:inline-block;">연락처 : </label>
            <input type="text" placeholder="연락처" name="uphone"/></br>            

            <label style="width:75px; height: 30px; display:inline-block;"></label>                    
            <input type="submit"  value="회원가입" />            
            <a th:href="@{/home}">홈으로</a>
        </form>        
    </div>    
</body>
</html>

파일명 security/login.html

<!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>security_login</title>
</head>

<body style="padding: 10px;">
    <h3>security_login 페이지 입니다.</h3>

    <hr />

    <div style="padding: 20px;">        
        <form th:action="@{/member/security_loginaction}" method="post"> 
            <label style="width:75px; height: 30px; display:inline-block;">이메일 : </label>
            <input type="text" placeholder="이메일" name="uemail"/></br>

            <label style="width:75px; height: 30px; display:inline-block;">암호 : </label>
            <input type="password" placeholder="암호" name="upw"/></br>            

            <label style="width:75px; height: 30px; display:inline-block;"></label>                    
            <input type="submit"  value="로그인" />
            <a th:href="@{/security_home}">홈으로</a>
            <a th:href="@{/member/security_join}">회원가입</a>
        </form>        
    </div>    
</body>
</html>

파일명 security/403page.html

<!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>403page</title>
</head>

<body style="padding: 10px;">
    <h3>접근불가 페이지 입니다.</h3>

    <hr />    
    <div style="padding: 20px;">       
        <a th:href="@{/security_home}">홈으로</a>
    </div>    

</body>
</html>

좋은 웹페이지 즐겨찾기