목차

UriComponentsBuilder

기본적인 예

final String url = UriComponentsBuilder.fromHttpUrl("http://api.kwonnam.pe.kr/users/{userId}")
  .queryParam("startIndex", 5)
  .queryParam("limit", 15)
  .queryParam("cities", "Seoul", "Daejon", "Jeonjoo", "Busan")
  .buildAndExpand(12345L)
  .toUriString();
 
// http://api.kwonnam.pe.kr/users/12345?startIndex=5&limit=15&cities=Seoul&cities=Daejon&cities=Jeonjoo&cities=Busan

MvcUriComponentsBuilder

MvcUriComponentsBuilder : 특정 @RequestMapping 컨트롤러 메소드를 가리키는 UriComponentsBuilder 생성