无序Uuid

This commit is contained in:
2025-11-07 13:40:07 +08:00
parent 4f5661bff3
commit e87f8f47b1

View File

@@ -1,6 +1,7 @@
package com.czg.config;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@@ -28,7 +29,7 @@ public class CorsFilter implements Filter {
if(copyOfContextMap == null){
copyOfContextMap = new HashMap<>();
}
copyOfContextMap.put("traceId",applicationName + IdUtil.getSnowflakeNextId());
copyOfContextMap.put("traceId",applicationName + IdUtil.fastSimpleUUID());
MDC.setContextMap(copyOfContextMap);
HttpServletResponse response = (HttpServletResponse) resp;
HttpServletRequest reqs = (HttpServletRequest) req;