RestTemplate请求多参数 简单封装

​​​​​​restTemplate之exchange调用_Langkaixin的博客-CSDN博客_resttemplate exchangerestTemplate配置@Configurationpublic class RestTemplateConfig { @Bean public RestTemplate restTemplate(ClientHttpRequestFactory factory){ RestTemplate restTemplate = new RestTemplate(factory); // 支持中文编码 restTemplate.getMesshttps://blog.csdn.net/Langkaixin/article/details/121933569RestTemplate get请求多参数 使用记录和简单封装_风行無痕的博客-CSDN博客_resttemplate 多个参数使用RestTemplate发送get请求时,如果有多个参数拼接起来会比较麻烦,在此做个简单的封装。接收端Controller@GetMapping(value = "/get/getByKeyword", produces = {"application/json;charset=UTF-8"})public String getByKeyword (@RequestParam(name = "name") String name,@RequestParam(name = "keyword"https://blog.csdn.net/gmaaa123/article/details/120070620

你可能感兴趣的:(java)