我尝试创建查询
@FeignClient(name = "geohelper", url = "http://geohelper.info/api/v1")
public interface GeohelperAPI {
@GetMapping(path = "/regions", consumes = "application/json")
GeohelperResponse getRegion(@RequestParam(name = "apiKey") String apiKey,
@RequestParam(name = "locale[lang]") String localeRu,
@RequestParam(name = "filter[name]") String region);
}
并且我的requestparams的名称包含符号[和]。
创建的请求类似于
apiKey=somekeysymbols&locale%5Blang%5D=%7Blocale%5Blang%5D%7D&filter%5Bname%5D=%7Bfilter%5Bname%5D%7D
其中的值{locale[lang]}
和{filter[name]}
代替"rightValueStrings"
这是一个错误吗?我如何才能逃脱此[]?