@Test public void when_url_is_localhost_project_MDC_contains_not_jobuuid_no_projectid() throws Exception { when(request.getRequestURI()).thenReturn("https: interceptorToTest.preHandle(request, response, handler); assertNull(MDC.get(LogConstants.MDC_SECHUB_JOB_UUID)); }
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { LOG.trace("Initial clearing MDC for asynchronous request"); MDC.clear(); try { handleRoutingInformation(request); } catch (Exception e) { LOG.error("Handle routing information failed - so continue without new MDC settings", e); } return super.preHandle(request, response, handler); }
SecHubServerMDCAsyncHandlerInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { LOG.trace("Initial clearing MDC for asynchronous request"); MDC.clear(); try { handleRoutingInformation(request); } catch (Exception e) { LOG.error("Handle routing information failed - so continue without new MDC settings", e); } return super.preHandle(request, response, handler); } }
SecHubServerMDCAsyncHandlerInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { LOG.trace("Initial clearing MDC for asynchronous request"); MDC.clear(); try { handleRoutingInformation(request); } catch (Exception e) { LOG.error("Handle routing information failed - so continue without new MDC settings", e); } return super.preHandle(request, response, handler); }  }
SecHubServerMDCAsyncHandlerInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { LOG.trace("Initial clearing MDC for asynchronous request"); MDC.clear(); try { handleRoutingInformation(request); } catch (Exception e) { LOG.error("Handle routing information failed - so continue without new MDC settings", e); } return super.preHandle(request, response, handler); }  @Override boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler); }
SecHubServerMDCAsyncHandlerInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { LOG.trace("Initial clearing MDC for asynchronous request"); MDC.clear(); try { handleRoutingInformation(request); } catch (Exception e) { LOG.error("Handle routing information failed - so continue without new MDC settings", e); } return super.preHandle(request, response, handler); }  @Override boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler);  }