| | |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | import org.springframework.web.util.UriComponentsBuilder; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.util.Arrays; |
| | | |
| | | @Slf4j |
| | | @Aspect |
| | | @Component |
| | |
| | | String ip = getRemoteHost(); |
| | | // 记录日志 |
| | | //msg 方法名 + 参数值 + 返回值 |
| | | String args = JSONObject.toJSONString(joinPoint.getArgs()); |
| | | // Stream.of(joinPoint.getArgs()).forEach(System.out::println); |
| | | // String args = JSONObject.toJSONString(joinPoint.getArgs()); |
| | | //String args1 = Arrays.toString(joinPoint.getArgs()); |
| | | logSv.save(user.id,user.name, operationName,ip,result.getCode(),args+" "+ result.getMsg()); |
| | | logSv.save(user.id,user.name, operationName,ip,result.getCode(),result.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("记录日志异常:"+e.getMessage()); |