fix: 로그아웃 후 재 로그아웃 시 에러나는 부분 조치
parent
8ff2bb54e2
commit
f47a6b6e16
|
|
@ -0,0 +1 @@
|
|||
explorer C:\Users\dbnt\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_eGov_work
|
||||
|
|
@ -524,11 +524,21 @@ public class LoginController {
|
|||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
|
||||
if( userId == null ) {
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " " + " userId == null: 이미 로그아웃되어있음." +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"userId:[" + "null" + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
mv.setViewName("/");
|
||||
} else {
|
||||
users.remove(userId, request.getSession());
|
||||
|
||||
RequestContextHolder.getRequestAttributes().removeAttribute(userId, RequestAttributes.SCOPE_SESSION);
|
||||
|
||||
request.getSession().invalidate();
|
||||
}
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -968,8 +968,11 @@ public class MainController
|
|||
} catch (SQLException e) {
|
||||
System.out.println(e.getMessage());
|
||||
|
||||
if (false && !e.getMessage().contains("Already closed")) {
|
||||
// "Already closed" 예외가 아닌 경우에만 처리
|
||||
if (true && e.getMessage().contains("Already closed")) {
|
||||
System.out.println("Already closed");
|
||||
|
||||
} else if (true && e.getMessage().contains("Socket read timed out")) {
|
||||
System.out.println("데이터베이스 연결 시간 초과");
|
||||
|
||||
}
|
||||
throw e;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue