废话不多说,一针见血,狠不狠你说了算!!
代码语言:javascript复制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;
}
剩下的加上去就行了,大家可以自行扩展。