Package org.springframework.web.method.annotation

Examples of org.springframework.web.method.annotation.ModelMethodProcessor


  }

  @Test
  public void setAlwaysUseRedirectAttributes() throws Exception {
    HandlerMethodArgumentResolver redirectAttributesResolver = new RedirectAttributesMethodArgumentResolver();
    HandlerMethodArgumentResolver modelResolver = new ModelMethodProcessor();
    HandlerMethodReturnValueHandler viewHandler = new ViewNameMethodReturnValueHandler();

    this.handlerAdapter.setArgumentResolvers(Arrays.asList(redirectAttributesResolver, modelResolver));
    this.handlerAdapter.setReturnValueHandlers(Arrays.asList(viewHandler));
    this.handlerAdapter.setIgnoreDefaultModelOnRedirect(true);
View Full Code Here


    assertMethodProcessorCount(RESOLVER_COUNT, INIT_BINDER_RESOLVER_COUNT, HANDLER_COUNT + 1);
  }

  @Test
  public void setReturnValueHandlers() {
    HandlerMethodReturnValueHandler handler = new ModelMethodProcessor();
    this.handlerAdapter.setReturnValueHandlers(Arrays.asList(handler));
    this.handlerAdapter.afterPropertiesSet();

    assertMethodProcessorCount(RESOLVER_COUNT, INIT_BINDER_RESOLVER_COUNT, 1);
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.method.annotation.ModelMethodProcessor

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.