메뉴 건너띄기
주메뉴 바로가기
본문 바로가기

이 누리집은 대한민국 공식 전자정부 누리집입니다.

본문 영역

적용 지원, FAQ, Q&A 게시판을 통해 기술 문제 해결을 지원합니다.

묻고 답하기

egov-com-servlet.xml의 인터셉터 사용관련
  • 작성자

    최*

  • 작성일

    2013-11-29 19:17:00

  • 조회수

    978

  • 구분

    기타

  • 진행상태

    완료

질문

egov-com-servlet.xml에서 인터셉터 설정과 관련하여 문의 드립니다.

개발중 인터셉터를 사용하려고 합니다. 그래서 AuthenticInterceptor.java 쪽에 해당 설정을 해 놓았습니다.

이후 json으로 데이터를 주고받는 설정을 하기 위해서 dispatcher-servlet.xml에 설정을 아래와 같이 변경하였습니다.

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">

<!-- Enables the Spring MVC @Controller programming model -->
<mvc:annotation-driven />

그랬더니 egov-com-servlet.xml의 인터셉터 부분이 정상동작하지 않네요.

혹시 인터셉터를 정상적으로 사용하는 방법이 있을까요?

첨부파일로 설정파일을 추가합니다.

첨부파일
답변

안녕하세요. 최헌님.

mvn namespace를 사용하신 경우는, 다음과 같이 추가하시면 됩니다.

<mvc:interceptors>
<bean id=".." class="..:"/>
</mvc:interceptors>

그럼, 즐거운 하루되십시오.
감사합니다.

이 페이지의 구성

묻고 답하기