diff --git a/VamPa/src/main/java/com/vam/controller/MemberController.java b/VamPa/src/main/java/com/vam/controller/MemberController.java index 53ee39c..6a84b49 100644 --- a/VamPa/src/main/java/com/vam/controller/MemberController.java +++ b/VamPa/src/main/java/com/vam/controller/MemberController.java @@ -179,6 +179,21 @@ public class MemberController { } + /* 메인페이지 로그아웃 */ + @RequestMapping(value="logout.do", method=RequestMethod.GET) + public String logoutMainGET(HttpServletRequest request) throws Exception{ + + logger.info("logoutMainGET메서드 진입"); + + HttpSession session = request.getSession(); + + session.invalidate(); + + return "redirect:/main"; + + } + + } diff --git a/VamPa/src/main/webapp/WEB-INF/views/main.jsp b/VamPa/src/main/webapp/WEB-INF/views/main.jsp index 3c5e912..62f46c4 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/main.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/main.jsp @@ -37,6 +37,7 @@ 회원 : ${member.memberName} 충전금액 : 포인트 : + 로그아웃 diff --git a/VamPa/src/main/webapp/resources/css/main.css b/VamPa/src/main/webapp/resources/css/main.css index 8c2cdec..a9263bf 100644 --- a/VamPa/src/main/webapp/resources/css/main.css +++ b/VamPa/src/main/webapp/resources/css/main.css @@ -89,6 +89,18 @@ margin: 5% auto; padding-top: 5%; } +.login_success_area>a{ + font-size: 15px; + font-weight: 900; + display: inline-block; + margin-top: 5px; + background: #e1e5e8; + width: 82px; + height: 22px; + line-height: 22px; + border-radius: 25px; + color: #606267; +} .login_success_area>span{ display : block; text-align: left; diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 353c6b0..cda9d83 100644 --- a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Wed Jan 20 18:37:06 KST 2021 +#Thu Jan 28 07:55:32 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa m2e.projectName=VamPa groupId=com.vam diff --git a/VamPa_MySQL/src/main/java/com/vam/controller/MemberController.java b/VamPa_MySQL/src/main/java/com/vam/controller/MemberController.java index a8712f7..683994b 100644 --- a/VamPa_MySQL/src/main/java/com/vam/controller/MemberController.java +++ b/VamPa_MySQL/src/main/java/com/vam/controller/MemberController.java @@ -178,4 +178,20 @@ public class MemberController { } + + /* 메인페이지 로그아웃 */ + @RequestMapping(value="logout.do", method=RequestMethod.GET) + public String logoutMainGET(HttpServletRequest request) throws Exception{ + + logger.info("logoutMainGET메서드 진입"); + + HttpSession session = request.getSession(); + + session.invalidate(); + + return "redirect:/main"; + + } + + } diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp index 3c5e912..62f46c4 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/main.jsp @@ -37,6 +37,7 @@ 회원 : ${member.memberName} 충전금액 : 포인트 : + 로그아웃 diff --git a/VamPa_MySQL/src/main/webapp/resources/css/main.css b/VamPa_MySQL/src/main/webapp/resources/css/main.css index 8c2cdec..a9263bf 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/main.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/main.css @@ -89,6 +89,18 @@ margin: 5% auto; padding-top: 5%; } +.login_success_area>a{ + font-size: 15px; + font-weight: 900; + display: inline-block; + margin-top: 5px; + background: #e1e5e8; + width: 82px; + height: 22px; + line-height: 22px; + border-radius: 25px; + color: #606267; +} .login_success_area>span{ display : block; text-align: left; diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 38ac48c..634b847 100644 --- a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Wed Jan 20 19:32:05 KST 2021 +#Thu Jan 28 08:32:01 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa_MySQL m2e.projectName=VamPa_MySQL groupId=com.vam