class HttpServletRequestUtil {

    /**
     * 获取HttpServletRequest对象
     *
     * @return
     */
    public static HttpServletRequest getRequest() {
        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
    }

    /**
     * 判断是否是Knife4j或是Swagger接口文档访问的请求
     *
     * @return
     */
    public static boolean isDocRequest() {
        return isDocRequest(getRequest());
    }

    /**
     * 判断是否是Knife4j或是Swagger接口文档访问的请求
     *
     * @param request
     * @return
     */
    public static boolean isDocRequest(HttpServletRequest request) {<FILL_FUNCTION_BODY>}

}

        String requestOrigion = request.getHeader(RequestHeadConstant.REQUEST_ORIGION);
        String referer = request.getHeader(RequestHeadConstant.REFERER);
        boolean docRequest = false;
        if (CommonConstant.KNIFE4J.equals(requestOrigion)) {
            docRequest = true;
        } else if (StringUtils.isNotBlank(referer) && referer.contains(CommonConstant.SWAGGER_UI_PATH)) {
            docRequest = true;
        }
        return docRequest;
    
<no_super_class>