|
@@ -9,7 +9,9 @@ package cn.com.qmth.examcloud.app.core.config;
|
|
|
|
|
|
import cn.com.qmth.examcloud.app.model.DeviceRecord;
|
|
|
import cn.com.qmth.examcloud.app.service.DeviceRecordService;
|
|
|
+import cn.com.qmth.examcloud.commons.util.ThreadLocalUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.logging.log4j.ThreadContext;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -43,6 +45,10 @@ public class AccessInterceptor extends HandlerInterceptorAdapter {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ // 设置log4j线程上下文
|
|
|
+ String traceId = ThreadLocalUtil.next();
|
|
|
+ ThreadContext.put("TRACE_ID", traceId);
|
|
|
+
|
|
|
if (request.getServletPath().contains("/router")) {
|
|
|
return true;
|
|
|
}
|