Spring RestTemplate URL没有足够的变量值可用于展开
我需要向RESTURL传递2个参数。像这样: 我正在尝试这样的事情,这显然是不正确的。请帮助:Spring RestTemplate URL没有足够的变量值可用于展开,spring,web-services,rest,restful-url,resttemplate,Spring,Web Services,Rest,Restful Url,Resttemplate,我需要向RESTURL传递2个参数。像这样: 我正在尝试这样的事情,这显然是不正确的。请帮助: restTemplate.getForObject(localUrl+"{userName}"+"/"+"{id}", Details.class); 编辑: 我也厌倦了这一点,但同样的错误是: String param = "{userName}/{id}"; restTemplate.getForObject(localUrl+param, Details.class); 谢谢 哈里什
restTemplate.getForObject(localUrl+"{userName}"+"/"+"{id}", Details.class);
编辑:
我也厌倦了这一点,但同样的错误是:
String param = "{userName}/{id}";
restTemplate.getForObject(localUrl+param, Details.class);
谢谢
哈里什