class EruptSuperInterceptor implements AsyncHandlerInterceptor {

    @Resource
    private EruptSessionService sessionService;

    @Resource
    private EruptUserService eruptUserService;


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException {<FILL_FUNCTION_BODY>}

}

        if (handler instanceof HandlerMethod) {
            HandlerMethod handlerMethod = (HandlerMethod) handler;
            EruptLoginAuth eruptAuth = handlerMethod.getMethodAnnotation(EruptLoginAuth.class);
            EruptMenuAuth eruptMenuAuth = handlerMethod.getMethodAnnotation(EruptMenuAuth.class);
            if (null != eruptAuth || null != eruptMenuAuth) {
                String token = request.getHeader(EruptReqHeaderConst.ERUPT_HEADER_TOKEN);
                if (null == token || null == sessionService.get(SessionKey.TOKEN_OLINE + token)) {
                    response.setStatus(HttpStatus.UNAUTHORIZED.value());
                    response.sendError(HttpStatus.UNAUTHORIZED.value());
                    return false;
                }
            }
            if (null != eruptMenuAuth) {
                if (null == eruptUserService.getEruptMenuByValue(eruptMenuAuth.value())) {
                    response.setStatus(HttpStatus.FORBIDDEN.value());
                    response.sendError(HttpStatus.FORBIDDEN.value());
                    return false;
                }
            }
        }
        return true;
    
<no_super_class>