|
@@ -62,16 +62,24 @@ public class RequestSignatureInterceptor implements HandlerInterceptor {
|
|
|
//记录开始时间
|
|
|
startTimeThreadLocal.set(System.currentTimeMillis());//线程绑定变量(该数据只有当前请求的线程可见)
|
|
|
|
|
|
+
|
|
|
//登录请求不拦截
|
|
|
String path = request.getServletPath();
|
|
|
+
|
|
|
if (ignorePaths.contains(path) && (HttpMethod.POST.matches(request.getMethod()) ||
|
|
|
HttpMethod.PUT.matches(request.getMethod()))) {
|
|
|
- logger.info("url: {} do not intercepted!");
|
|
|
+ logger.info("url: {} do not intercepted!, method={}", path, request.getMethod());
|
|
|
return true;
|
|
|
}
|
|
|
+ else if(path.endsWith("/heartBeat")){
|
|
|
+ //heartBeat请求不拦截
|
|
|
+ logger.info("url: {} do not intercepted!", path);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
GlobalHeader headers = RequestHeaderManager.parseHeader(request);
|
|
|
- logger.info("request start, path={}, headers={}", path, JSON.toJSONString(headers));
|
|
|
+ logger.info("request start, path={}, method={}, headers={}", path, request.getMethod(), JSON.toJSONString(headers));
|
|
|
|
|
|
String uid = headers.getUid();
|
|
|
String sign = headers.getSign();
|