| | |
| | | package com.gkhy.assess.framework.aop; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.core.util.URLUtil; |
| | | import cn.hutool.extra.servlet.ServletUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.gkhy.assess.common.utils.StringUtils; |
| | | import com.gkhy.assess.system.utils.ShiroUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.aspectj.lang.JoinPoint; |
| | |
| | | StringBuffer requestURL = request.getRequestURL(); |
| | | JSONObject webLog = new JSONObject(); |
| | | String urlStr = request.getRequestURL().toString(); |
| | | webLog.put("basePath",StrUtil.removeSuffix(urlStr, URLUtil.url(urlStr).getPath())); |
| | | webLog.put("basePath", StringUtils.removeSuffix(urlStr, URLUtil.url(urlStr).getPath())); |
| | | webLog.put("ip", ServletUtil.getClientIP(request,null)); |
| | | webLog.put("method",request.getMethod()); |
| | | Object params=getParameter(method, joinPoint.getArgs()); |
| | |
| | | if (requestParam != null) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String key = parameters[i].getName(); |
| | | if (StrUtil.isNotEmpty(requestParam.value())) { |
| | | if (StringUtils.isNotEmpty(requestParam.value())) { |
| | | key = requestParam.value(); |
| | | } |
| | | map.put(key, args[i]); |