Search in sources :

Example 1 with HandlerMethodReturnValueHandlerComposite

use of org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite in project spring-framework by spring-projects.

the class ExceptionHandlerExceptionResolver method setReturnValueHandlers.

/**
	 * Configure the complete list of supported return value types thus
	 * overriding handlers that would otherwise be configured by default.
	 */
public void setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
    if (returnValueHandlers == null) {
        this.returnValueHandlers = null;
    } else {
        this.returnValueHandlers = new HandlerMethodReturnValueHandlerComposite();
        this.returnValueHandlers.addHandlers(returnValueHandlers);
    }
}
Also used : HandlerMethodReturnValueHandlerComposite(org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite)

Example 2 with HandlerMethodReturnValueHandlerComposite

use of org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite in project spring-framework by spring-projects.

the class RequestMappingHandlerAdapter method setReturnValueHandlers.

/**
	 * Configure the complete list of supported return value types thus
	 * overriding handlers that would otherwise be configured by default.
	 */
public void setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
    if (returnValueHandlers == null) {
        this.returnValueHandlers = null;
    } else {
        this.returnValueHandlers = new HandlerMethodReturnValueHandlerComposite();
        this.returnValueHandlers.addHandlers(returnValueHandlers);
    }
}
Also used : HandlerMethodReturnValueHandlerComposite(org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite)

Aggregations

HandlerMethodReturnValueHandlerComposite (org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite)2