Package org.springframework.hateoas.mvc

Examples of org.springframework.hateoas.mvc.UriComponentsContributor


   */
  @Test
  public void replacesExistingPaginationInformation() throws Exception {

    MethodParameter parameter = new MethodParameter(Sample.class.getMethod("supportedMethod", Pageable.class), 0);
    UriComponentsContributor resolver = new HateoasPageableHandlerMethodArgumentResolver();
    UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:8080?page=0&size=10");
    resolver.enhance(builder, parameter, new PageRequest(1, 20));

    MultiValueMap<String, String> params = builder.build().getQueryParams();

    List<String> page = params.get("page");
    assertThat(page.size(), is(1));
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.mvc.UriComponentsContributor

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.