A good place to start the sorting process is AbstractMessageConverterMethodProcessor.writeWithMessageConvertersto give you a good overview of what is being done.
Regarding the logging aspect, the first of the catchentire marshalling / non-marshalling process is ServletInvocableHandlerMethod.invokeAndHandle:
catch (Exception ex) {
if (logger.isTraceEnabled()) {
logger.trace(getReturnValueHandlingErrorMessage("Error handling return value", returnValue), ex);
}
throw ex;
}
- TRACE - org.springframework.web.servlet.mvc.method.annotation .
, , - DEBUG TRACE: DispatcherServlet.processHandlerException.
, .