Package org.springframework.web.util

Examples of org.springframework.web.util.UriComponents.toUriString()


  @RequestMapping(value="/uriComponentsBuilder", method=RequestMethod.GET)
  public String uriComponentsBuilder() {
    String date = this.conversionService.convert(new LocalDate(2011, 12, 31), String.class);
    UriComponents redirectUri = UriComponentsBuilder.fromPath("/redirect/{account}").queryParam("date", date)
        .build().expand("a123").encode();
    return "redirect:" + redirectUri.toUriString();
  }

  @RequestMapping(value="/{account}", method=RequestMethod.GET)
  public String show(@PathVariable String account, @RequestParam(required=false) LocalDate date) {
    return "redirect/redirectResults";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.