메뉴 건너뛰기

조회 수 6674 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
로그인 체크 인터셉터를 사용하기 위해서는 다음과 같은 파일과 코딩이 필요합니다.

1. 프로젝트 디렉토리 /src/main/java/egovframework/com/cmm/interceptor 에 AuthenticInterceptor.java 복사 


해당 파일은 공통컴포넌트의 공통파일에 있습니다.


2. /src/main/java/egovframework/com/cmm/util 에 EgovuserDetailsHelper.java 복사


3. /src/main/java/egovframework/com/cmm 에 LoginVO.java 복사


4. /webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml 에 다음 코드를 넣는다.


<!-- ReqeustMapping 과 Controller 클래스 매핑을 위한 annotation mvc 설정 -->

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>


<!-- 로그인 체크가 필요한 URL과 로그인 여부를 체크해줄 인터셉터를 등록한다. -->

<bean id="selectAnnotaionMapper" class="egovframework.rte.ptl.mvc.handler.SimpleUrlAnnotationHandlerMapping"

          p:order="1">

<property name="interceptors">

<list>

<ref local="authenticInterceptor" />

</list>

</property>

<!-- 로그인 체크가 필요한 URL 리스트  -->

<property name="urls">

<set>

<!-- 로그인 후 사용이 가능한 메뉴의 경로를 등록해 준다. -->

<value>/list/*.do</value>

<value>/photo/*.do</value>

</set>

</property>

</bean>

    

<!-- 로그인 체크 인터셉터의 접근허용 URL 리스트--> 

<bean id="authenticInterceptor" class="kr.go.tongtong.cmm.interceptor.AuthenticInterceptor" >

<property name="permittedURL">

<set>

<value>/uat/uia/actionLogin.do</value>

<value>/uat/uia/egovLoginUsr.do</value>

</set>

</property>

</bean>




List of Articles
번호 제목 날짜 조회 수
43 첫 실행 URL 변경 file 2018.06.05 2715
42 전자정부프레임워크 설치 및 실행 file 2018.12.07 1381
41 전자정부프레임워크 사용 중 중복 저장 방지 (새로고침 혹은 뒤로가기시) 2018.06.12 3053
40 전자정부프레임워크 구조 파악하기 file 2018.06.02 4117
39 전자정부표준프레임워크 파일 업로드 크기 설정(feat. MaxUploadSizeExceededException) file 2019.02.28 1101
38 전자정부 프레임워크(eGovframe) 동적 웹프로젝트 시작하기(2) file 2017.09.12 4165
37 전자정부 프레임워크(egov framework) 설치하기(1) file 2017.09.12 5296
36 전자정부 표준프레임워크 파일업로드용량설정 file 2018.12.06 1891
35 이클립스에서 인코딩 설정 file 2018.06.21 2330
34 이클립스(Eclipse) 한글 언어팩 설치. Babel 프로젝트 file 2018.12.07 1199
33 이클립스(Eclipse) 소스 일괄 수정 file 2018.12.07 1097
32 이클립스 파일 찾기 & 문자열 검색 file 2018.06.21 2405
31 예제 따라하기(1) - 기본 서블릿 구현 file 2018.06.05 2922
30 스프링프레임워크 <form:form> 태그 사용법 file 2018.12.06 1182
29 스프링프레임워크 <form:form> 태그 사용법 file 2019.02.28 3514
28 스프링 CKEditor 적용 - 에디터 2018.06.12 5569
27 서버로부터 메시지 받아서 팝업 띄우기 (1. ModelAndView 이용) file 2021.03.09 574
» 로그인 체크 인터셉터 사용 (AuthenticInterceptor) 2016.09.21 6674
25 공통코드관리 2016.09.21 5760
24 개발자로서 기본 구성합니다. file 2016.08.18 4937
Board Pagination Prev 1 2 3 Next
/ 3

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved