nested exception is : It is illegal to call this method if the current request is not in asynchronous mode (. isAsyncStarted() returns false)] with root cause
private void addOperationLog(JoinPoint joinPoint, Object res, int time) {
MethodSignature signature = (MethodSignature)();
MpOpLog operationLog = new MpOpLog();
(time);
((res));
("================:"+());
Object[] args = ();
Object[] arguments = new Object[];
("================:"+args);
for (int i = 0; i < ; i++) {
if (args[i] instanceof ServletRequest || args[i] instanceof ServletResponse || args[i] instanceof MultipartFile) {
//ServletRequest不能序列化,从入参里排除,否则报异常:: It is illegal to call this method if the current request is not in asynchronous mode (. isAsyncStarted() returns false)
//ServletResponse不能序列化 从入参里排除,否则报异常:: getOutputStream() has already been called for this response
continue;
}
arguments[i] = args[i];
}
String paramter = "";
if (arguments != null) {
try {
paramter = (arguments);
} catch (Exception e) {
paramter = ();
}
}
("================:"+());
(());
(new Date());
(() + "." + ());
String uerid = ("userId");
String userName = ("userName");
((uerid, "anonymous"));
((userName, "anonymous"));
OpLog annotation = ().getAnnotation();
if (annotation != null) {
(().toString().replace("-", ""));
(());
(getDetail(((MethodSignature)()).getParameterNames(),
arguments, annotation));
(().getValue());
(());
}
(operationLog);
}