junggoon
60
2018-07-06 10:51:58 작성 2018-07-06 10:55:21 수정됨
0
850

spring interceptor에서 exclude-mapping이 동작하지 않는것 같아요.


servlet-context.xml

<mvc:interceptors>
	<mvc:interceptor>
		<mvc:mapping path="/**/*"/>
		<mvc:exclude-mapping path="/login.do"/>
		<beans:bean class="com.xxx.config.SessionInterceptor"/>
	</mvc:interceptor>
</mvc:interceptors>

Interceptor.class

public class SessionInterceptor extends HandlerInterceptorAdapter{
	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
			throws Exception {
		// TODO Auto-generated method stub
		
		logger.info("preHandle start::");
                /* annotaion, session 분기 */
		return true;
}

Controller.class

	@NotLoginCheck
	@RequestMapping(value="/login.do", method = RequestMethod.GET)
	public ModelAndView loginView(@ModelAttribute TB_COMMON_MNGR_MASTER input, HttpServletRequest req, HttpServletResponse res, Locale locale) throws Throwable {
		ModelAndView mav = new ModelAndView("/login/login");
		logger.info(req.getMethod());
		return mav;
	}


/login.do 에 접근했을때 interceptor에서 찍은 로그가 계속 찍히네요


어느부분이 빠졌는지 잘 모르겠습니다.. 고수님들 고견 부탁드립니다!

0
0
  • 답변 0

  • 로그인을 하시면 답변을 등록할 수 있습니다.