| | |
| | | strModule = parserSpel(qLog.module(), joinPoint); |
| | | qLogType = qLog.type(); |
| | | } |
| | | // 默认为参数相关信息 |
| | | // 默认为参数相关信息 |
| | | if (StringUtils.isEmpty(strContent)) { |
| | | strContent = createDefaultContentInfo(joinPoint, methodSignature); |
| | | } |
| | | // 默认为请求的URI信息 |
| | | // 默认为请求的URI信息 |
| | | if(StringUtils.isEmpty(strDesp) && request!=null){ |
| | | strDesp =request.getRequestURI(); |
| | | } |
| | | // 默认为:控制器模块注解value值+方法名 |
| | | // 默认为:控制器模块注解value值+方法名 |
| | | if (StringUtils.isEmpty(strModule)) { |
| | | strModule = createDefaultModuleInfo(joinPoint); |
| | | } |
| | |
| | | |
| | | this.saveLog(strContent, strDesp, strModule.toUpperCase(), sLogType, ip,userAgent); |
| | | } catch (Exception e) { |
| | | logger.error("记录action操作日志发生异常!,errMsg:" + e.getMessage(), e); |
| | | logger.error("记录action操作日志发生异常!,errMsg:" + e.getMessage(), e); |
| | | } |
| | | } |
| | | |
| | |
| | | MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); |
| | | ExpressionParser parser = new SpelExpressionParser(); |
| | | EvaluationContext ctx = new StandardEvaluationContext(); |
| | | // 设置变量 |
| | | // 设置变量 |
| | | if (joinPoint.getArgs() != null && joinPoint.getArgs().length > 0) { |
| | | for (int i = 0; i < joinPoint.getArgs().length; i++) { |
| | | if (joinPoint.getArgs()[i] != null && this.checkParam(joinPoint.getArgs()[i].getClass())) { |