Package org.springframework.web.servlet.mvc.method.annotation

Examples of org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor


    ServletWebRequest webRequest = new ServletWebRequest(request, response);

    MethodParameter returnType = new MethodParameter(this.getClass().getMethod("handle"), -1);

    List<HttpMessageConverter<?>> converters = Arrays.<HttpMessageConverter<?>>asList(new ByteArrayHttpMessageConverter());
    HttpEntityMethodProcessor processor = new HttpEntityMethodProcessor(converters);
    processor.handleReturnValue(responseEntity, returnType, new ModelAndViewContainer(), webRequest);

    assertEquals("no-cache", response.getHeader("Cache-Control"));
  }
View Full Code Here


    // Custom return value handlers
    this.returnValueHandlers.addHandlers(this.customReturnValueHandlers);

    // Type-based handlers
    this.returnValueHandlers.addHandler(new ModelAndViewMethodReturnValueHandler());
    this.returnValueHandlers.addHandler(new FacesResponseCompleteReturnValueHandler(new HttpEntityMethodProcessor(
        this.messageConverters)));

    // Default handler
    this.returnValueHandlers.addHandler(new NavigationMethodReturnValueHandler());
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.