feat: login & index page 처리

main
Jonguk. Lim 12 months ago
parent 16daa79577
commit 08ebe229d3

@ -14,7 +14,7 @@ import org.springframework.security.core.*;
import org.springframework.security.core.context.*;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import egovframework.com.cmm.IncludedCompInfoVO;
import egovframework.com.cmm.LoginVO;
@ -22,6 +22,8 @@ import egovframework.com.cmm.annotation.IncludedInfo;
import egovframework.com.cmm.service.EgovProperties;
import egovframework.com.cmm.util.EgovUserDetailsHelper;
import egovframework.let.uat.uia.service.*;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.tags.*;
/**
* IncludedInfo annotation
@ -54,6 +56,7 @@ import egovframework.let.uat.uia.service.*;
*/
@Controller
@Tag(name="EgovComIndexController",description = "Index page MVC 관련")
public class EgovComIndexController {
@Value("${Globals.ExpirePwdDay:180}")
private int EXPIRE_PWD_DAY;
@ -67,22 +70,27 @@ public class EgovComIndexController {
@Resource(name = "loginService")
private EgovLoginService loginService;
@RequestMapping("/index.do")
@GetMapping("/index.do")
public String index(ModelMap model) {
return "egovframework/com/cmm/EgovUnitMain";
}
@RequestMapping("/EgovTop.do")
@GetMapping("/EgovTop.do")
public String top() {
return "egovframework/com/cmm/EgovUnitTop";
}
@RequestMapping("/EgovBottom.do")
@GetMapping("/EgovBottom.do")
public String bottom() {
return "egovframework/com/cmm/EgovUnitBottom";
}
@RequestMapping("/EgovContent.do")
@Operation(
summary = "콘텐츠 페이지",
description = "콘텐츠 페이지 return",
tags = {"EgovComIndexController"}
)
@GetMapping("/EgovContent.do")
public String setContent(ModelMap model) throws Exception {
// 설정된 비밀번호 유효기간을 가져온다. ex) 180이면 비밀번호 변경후 만료일이 앞으로 180일
@ -113,7 +121,12 @@ public class EgovComIndexController {
return "egovframework/com/cmm/EgovUnitContent";
}
@RequestMapping("/EgovLeft.do")
@Operation(
summary = "Left 콘텐츠 페이지",
description = "Left 콘텐츠 페이지 return",
tags = {"EgovComIndexController"}
)
@GetMapping("/EgovLeft.do")
public String setLeftMenu(ModelMap model) {
Map<Integer, IncludedCompInfoVO> map = new TreeMap<Integer, IncludedCompInfoVO>();
@ -193,7 +206,7 @@ public class EgovComIndexController {
// context-security.xml 설정
// csrf="true"인 경우 csrf Token이 없는경우 이동하는 페이지
// csrfAccessDeniedUrl="/egovCSRFAccessDenied.do"
@RequestMapping("/egovCSRFAccessDenied.do")
@GetMapping("/egovCSRFAccessDenied.do")
public String egovCSRFAccessDenied() {
return "egovframework/com/cmm/error/csrfAccessDenied";
}

@ -101,7 +101,7 @@ public class EgovLoginController {
/**
*
* @param vo - URL LoginVO
* @param loginVO - URL LoginVO
* @return
* @exception Exception
*/
@ -151,17 +151,17 @@ public class EgovLoginController {
/**
* ()
* @param vo - , LoginVO
* @param loginVO - , LoginVO
* @param request - HttpServletRequest
* @return result - ()
* @exception Exception
* @param model - Model
* @return String - or
*/
@Operation(
summary = "로그인",
description = "로그인 처리",
tags = {"EgovLoginController"}
)
@RequestMapping(value = "/uat/uia/actionLogin.do", method = {RequestMethod.POST}, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
@PostMapping(value = "/uat/uia/actionLogin.do", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public String actionLogin(@ModelAttribute("loginVO") LoginVO loginVO, HttpServletRequest request, ModelMap model) throws Exception {
// 1. 로그인인증제한 활성화시
@ -305,16 +305,16 @@ public class EgovLoginController {
//
/**
*
* @param
* @param request HttpServletRequest
* @param model Model
* @return
* @exception Exception
*/
@Operation(
summary = "메인 페이지",
description = "메인 페잊 처리",
tags = {"EgovLoginController"}
)
@RequestMapping(value = "/uat/uia/actionMain.do", method = { RequestMethod.GET})
@GetMapping(value = "/uat/uia/actionMain.do")
public String actionMain(HttpServletRequest request,ModelMap model) throws Exception {
// 1. Spring Security 사용자권한 처리
@ -375,14 +375,13 @@ public class EgovLoginController {
/**
* .
* @return String
* @exception Exception
*/
@Operation(
summary = "로그 아웃",
description = "로그 아웃 처리",
tags = {"EgovLoginController"}
)
@RequestMapping(value = "/uat/uia/actionLogout.do", method = { RequestMethod.GET, RequestMethod.POST})
@GetMapping(value = "/uat/uia/actionLogout.do")
public String actionLogout(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception {
/*String userIp = EgovClntInfo.getClntIP(request);
@ -624,7 +623,7 @@ public class EgovLoginController {
description = "세션 타임 아웃 시간 연장",
tags = {"EgovLoginController"}
)
@PostMapping(value="/uat/uia/refreshSessionTimeout.do")
@GetMapping(value="/uat/uia/refreshSessionTimeout.do")
public ModelAndView refreshSessionTimeout(@RequestParam Map<String, Object> commandMap) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName(XitConstants.DEFAULT_VIEW);

@ -43,14 +43,14 @@
// 쿠키값을 가져온다
String cValue = c.getValue() ;
if ("egovLatestServerTime".equals(cName)) {
out.println("===>>> egovLatestServerTime = "+cName+":"+cValue);
//out.println("===>>> egovLatestServerTime = "+cName+":"+cValue);
egovLatestServerTime = cValue;
}
if ("egovExpireSessionTime".equals(cName)) {
out.println("===>>> egovExpireSessionTime = "+cName+":"+cValue);
//out.println("===>>> egovExpireSessionTime = "+cName+":"+cValue);
egovExpireSessionTime = cValue;
}
out.println("===>>> cookie = "+cName+":"+cValue);
//out.println("===>>> cookie = "+cName+":"+cValue);
}
}

Loading…
Cancel
Save