It is illegal to call this method if the current request is not in asynchronous mode
程序员文章站
2024-02-12 11:19:40
...
nested exception is java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)] with root cause
MethodSignature methodSignature = ((MethodSignature) joinPoint.getSignature());
String methodName = methodSignature.getName();
String className = methodSignature.getDeclaringTypeName();
Object[] args = joinPoint.getArgs();
String argwStr = JSON.toJSONString(args);
当使用切面时,如果使用args中包含了,request对象会到导致程序抛出throwable异常信息,所以加切面时建议将args数组中的内容进行移除。或者不要直接将前台的请求进行拦截后进行json转换。
上一篇: 思科交换机配置笔记