class ApiResBodyAdvice implements ResponseBodyAdvice {

    /** 注入 是否开启 knife4j **/
    @Value("${knife4j.enable}")
    private boolean knife4jEnable = false;

    /** 判断哪些需要拦截 **/
    @Override
    public boolean supports(MethodParameter returnType, Class converterType) {<FILL_FUNCTION_BODY>}

    /** 拦截返回数据处理 */
    @Override
    public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType,
                                  Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {

        //处理扩展字段
        return ApiResBodyAdviceKit.beforeBodyWrite(body);
    }

}


        // springfox.documentation.swagger.web.ApiResourceController    -- /swagger-resources
        // springfox.documentation.swagger2.web.Swagger2ControllerWebMvc  -- /v2/api-docs
        if(knife4jEnable && returnType.getMethod().getDeclaringClass().getName().startsWith("springfox.documentation.swagger")){
            return false;
        }

        return true;
    
<no_super_class>