참조 : http://stackoverflow.com/questions/15774475/how-to-send-a-getforobject-request-with-parameters-spring-mvc


RestTemplate 객체를 사용하여 url 주소를 호출과 동시에 파라미터를 전달 해줄 경우 Uri 객체에 파라미터를 넣어 코드를 작성하여야한다.


Uri targetUrl= UriComponentsBuilder.fromUriString(BASE_URL)
    .path("/android/played.json")
    .queryParam("name", nome)
    .build()
    .toUri();
return restTemplate.getForObject(targetUrl, Name.class);


설정

트랙백

댓글