我尝试使用多个查询字符串参数调用Google API。奇怪的是,我找不到一种方法来做到这一点。如何在FeignClient中使用多个查询字符串参数调用url?
这是我FeignClient:
@FeignClient(name="googleMatrix", url="https://maps.googleapis.com/maps/api/distancematrix/json")
public interface GoogleMatrixClient {
@RequestMapping(method=RequestMethod.GET, value="?key={key}&origins={origins}&destinations={destinations}")
GoogleMatrixResult process(@PathVariable(value="key") String key,
@PathVariable(value="origins") String origins,
@PathVariable(value="destinations") String destinations);
}
的问题是,RequestMapping value
的 '&' 字符由&
替换如何避免这种情况?
谢谢!
好吧,完美,我测试很多东西,但不是这个! – jeremieca