java

RestTemplate Urlcoding 삽질기..

무세1 2016. 7. 8. 18:25


RestTemplate는 자동으로 URLEcoding을 해준다.


GET방식으로 아래 URL호출시에... 특수문자 '=' URLEncoding을 해줄필요가 없다..

RestTemplate에서느 자동으로 해준다. 


http://localhost:9999/test?param=test=


RestTemplate restTemplate = new RestTemplate();

String result = restTemplate.getForObject("http://localhost:9999/test?param=test=", String.class);