类 LogRestApiInterceptor

java.lang.Object
com.sie.mbm.mom.framework.apilog.step.rest.LogRestApiInterceptor
所有已实现的接口:
org.springframework.http.client.ClientHttpRequestInterceptor

@Component @Qualifier("logRestApiInterceptor") @Order(2147483647) public class LogRestApiInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
  • 字段详细资料

    • logger

      private static final org.slf4j.Logger logger
    • logProperties

      LogProperties logProperties
  • 构造器详细资料

    • LogRestApiInterceptor

      public LogRestApiInterceptor()
  • 方法详细资料

    • intercept

      public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException
      拦截器
      指定者:
      intercept 在接口中 org.springframework.http.client.ClientHttpRequestInterceptor
      参数:
      request - 请求
      body - 请求体
      execution - 执行
      返回:
      ClientHttpResponse
      抛出:
      IOException - 异常
    • handleSuccess

      private LogRestApiInterceptor.CachedBodyClientHttpResponseWrapper handleSuccess(LogApiInfo logApiInfo, org.springframework.http.client.ClientHttpResponse response) throws IOException
      处理成功请求
      参数:
      logApiInfo - 日志信息
      response - 响应
      返回:
      CachedBodyClientHttpResponseWrapper
      抛出:
      IOException - 响应体异常
    • handleError

      private void handleError(LogApiInfo logApiInfo, Exception ex)
      处理异常请求
      参数:
      logApiInfo - 日志信息
      ex - 异常
    • setRecord

      private void setRecord(LogApiInfo logApiInfo)