1. 程式人生 > >java.lang.IllegalStateException: It is illegal to call this method if the current request is not in

java.lang.IllegalStateException: It is illegal to call this method if the current request is not in

使用fastjson報的錯誤
原因是序列化了

ServletRequest
ServletResponse
MultipartFile

這些類的物件
而這些類的物件不能序列化
參考
關於一次AOP攔截入參記錄日誌報錯的梳理總結
It is illegal to call this method if the current request is not in asynchronous mode #1778