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

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

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

Loading…
Cancel
Save