Commit 1cb15bd2 authored by Quxl's avatar Quxl

c

parent 875a9920
...@@ -23,6 +23,9 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -23,6 +23,9 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
@Value("${log.isOpen}") @Value("${log.isOpen}")
private Boolean isOpen; private Boolean isOpen;
@Value("${log.sProjectID:SHOP}")
private Boolean sProjectID;
@Override @Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception { public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
this.exec(req); this.exec(req);
...@@ -41,7 +44,7 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -41,7 +44,7 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
String remoteIp = ServletUtil.remoteIp(req); String remoteIp = ServletUtil.remoteIp(req);
String params = JSON.toJSONString(req.getParameterMap()); String params = JSON.toJSONString(req.getParameterMap());
Map<String, Object> map = new HashMap<String,Object>(); Map<String, Object> map = new HashMap<String,Object>();
map.put("sProjectID", "SHOP"); map.put("sProjectID", sProjectID);
map.put("sURI", uri); map.put("sURI", uri);
map.put("sClientIP", remoteIp); map.put("sClientIP", remoteIp);
map.put("sParams", params); map.put("sParams", params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment