class WebActionControllerAdvice implements ResponseBodyAdvice<Object> {

	@SuppressWarnings("unchecked")
	@Override
	public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, 
			Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
		
		logit.debug(()->"Processed response from "+WebActionController.class+": "
					+ "\n"+ body);
		
		MultiExecuteOutput multiOutput = defaultInterceptor.handleResponse(body);
		
		String responseBodyHeader = request.getHeaders().getFirst(Constants.HTTP_RESPONSEBODY_INTERCEPTOR_HEADER.code);
		
		if(StringUtils.isBlank(responseBodyHeader))
			return multiOutput;
		
		ResponseInterceptor<MultiExecuteOutput> interceptor = beanResolver.find(ResponseInterceptor.class, RESPONSE_INTERCEPTOR_BEAN_PREFIX+responseBodyHeader);
		
		if(interceptor == null)
			return multiOutput;
		
		interceptor.intercept(multiOutput);
		
		return multiOutput;
	}

}