It is illegal to call this method if the current request is not in asynchronou

废话不多说,一针见血,狠不狠你说了算!!

public static Object filterParams(Object object){
    
    
    if(object instanceof HttpServletRequest){
    
    
        object = "请求格式为Request类型,实例化失败,已经转换为字符串:("+object.toString()+")";
    }
    if(object instanceof HttpServletResponse){
    
    
        object = "请求格式为Response类型,实例化失败,已经转换为字符串:("+object.toString()+")";
    }
    if(object instanceof MultipartFile || object instanceof MultipartFile[]){
    
    
        object = "请求格式为文件流类型,实例化失败,已经转换为字符串:("+object.toString()+")";
    }
    return object;
}

在这里插入图片描述

剩下的加上去就行了,大家可以自行扩展。

顺便说一下我的小店铺,最低1原,一万套html源码模版http://mtw.so/5uysAA

猜你喜欢

转载自blog.csdn.net/u014641168/article/details/121339884
今日推荐