@Override
	public boolean preHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler) throws Exception {
		// TODO Auto-generated method stub
		
		MemberVO loginVo = (MemberVO) WebUtils.getSessionAttribute(request, "MEMBER_LOGIN");
		String uri = request.getRequestURI();
		
		logger.info("AuthInterceptor uri == " + uri);
		
		if( uri.indexOf("admin") > 0 ){
			//관리자 일때
			if(loginVo != null){
				if( !loginVo.getAuth().equals("9") && uri.indexOf("login") == -1 ){
					response.sendRedirect("/admin/loginForm.do");
					return false;
				}
			}else if(loginVo == null && uri.indexOf("login") == -1){
				response.sendRedirect("/admin/loginForm.do");
				return false;
			}
		}else{
			
			if( !(uri.indexOf("login") > 0 || uri.indexOf("logout") > 0) ){
				if(loginVo == null){
					response.sendRedirect("/");
					return false;
				}
			}
		}
							
		
		return true;
	}