修正RequestFilter的错误
This commit is contained in:
parent
72b4a4023f
commit
b48a8a61e0
@ -30,6 +30,8 @@ public class RuntimeContext implements Serializable {
|
|||||||
private String traceId; // 全局trace id
|
private String traceId; // 全局trace id
|
||||||
@JsonProperty(RecordField.START_TIMESTAMP)
|
@JsonProperty(RecordField.START_TIMESTAMP)
|
||||||
private Long startTimeStamp; // 开始请求时间
|
private Long startTimeStamp; // 开始请求时间
|
||||||
|
@JsonProperty(RecordField.REQUEST_INFO)
|
||||||
|
private Request requestInfo; // 请求信息
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private HttpServletRequest httpServletRequest;// 请求实例
|
private HttpServletRequest httpServletRequest;// 请求实例
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
@ -64,12 +64,6 @@ public class RequestInitFilter extends HttpFilter {
|
|||||||
runtimeContext.setServerIp(httpServletRequest.getLocalAddr()); // 服务器IP
|
runtimeContext.setServerIp(httpServletRequest.getLocalAddr()); // 服务器IP
|
||||||
runtimeContext.setServerHostname(httpServletRequest.getLocalName()); // 服务器名称
|
runtimeContext.setServerHostname(httpServletRequest.getLocalName()); // 服务器名称
|
||||||
runtimeContext.setStartTimeStamp(System.currentTimeMillis()); // 开始请求时间
|
runtimeContext.setStartTimeStamp(System.currentTimeMillis()); // 开始请求时间
|
||||||
// 响应信息
|
|
||||||
Response response = new Response();
|
|
||||||
response.setHttpServletResponse(httpServletResponse);
|
|
||||||
response.setHeader(new HashMap<>());
|
|
||||||
response.setCookie(new HashMap<>());
|
|
||||||
runtimeContext.setResponseInfo(response); // 响应信息
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置请求Query
|
// 设置请求Query
|
||||||
@ -127,7 +121,4 @@ public class RequestInitFilter extends HttpFilter {
|
|||||||
private void setRequestId(RuntimeContext runtimeContext) {
|
private void setRequestId(RuntimeContext runtimeContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 响应信息
|
|
||||||
private void setResponse(Response response) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user