Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller方法参数列表中带有HttpServletRequest类型参数,执行完成后,保存日志报错 #1394

Closed
qingjing0606 opened this issue Jun 30, 2020 · 2 comments

Comments

@qingjing0606
Copy link

版本号:2.2.0
问题描述:controller中方法加入HttpServletRequest参数,执行完成后保存日志时,抛异常,需过滤掉HttpServletRequest或HttpServletResponse参数
截图&代码:

image

java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
at org.apache.catalina.connector.Request.getAsyncContext(Request.java:1758)
at org.apache.catalina.connector.RequestFacade.getAsyncContext(RequestFacade.java:1068)
at javax.servlet.ServletRequestWrapper.getAsyncContext(ServletRequestWrapper.java:435)
at com.alibaba.fastjson.serializer.ASMSerializer_2_ShiroHttpServletRequest.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:333)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:311)
at com.alibaba.fastjson.serializer.ObjectArrayCodec.write(ObjectArrayCodec.java:118)
at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:285)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:745)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:683)
at com.alibaba.fastjson.JSON.toJSONString(JSON.java:648)
at org.jeecg.modules.system.aspect.AutoLogAspect.getReqestParams(AutoLogAspect.java:147)
at org.jeecg.modules.system.aspect.AutoLogAspect.saveSysLog(AutoLogAspect.java:88)

src/main/java/org/jeecg/modules/system/aspect/AutoLogAspect.java
image

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

待测试

@1298191366
Copy link

新版本已修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants