restTemplate Not enough variable values availabel
来源:互联网 发布:淘宝药店七乐康 假 编辑:程序博客网 时间:2024/06/11 00:04
用 Spring RestTemplate 请求URL为"http://dffffff/fdsa?queryParam={\"fds\":\"www\"}"时报Not enough variable values availabel异常,其根本原因是RestTemplate认为大括号{…}在给定的URL作为一个URI变量占位符和试图取代他们,
可用queryParam={queryParam}替代
Map<String,Object> params = new HashMap<>();if(!StringUtils.isEmpty(mobile)) params.put("mobile", mobile);if(!StringUtils.isEmpty(userName)) params.put("name", userName);if(!StringUtils.isEmpty(email)){ params.put("email", email);String queryParam = JSONObject.valueToString(params);ResponseEntity<PSResponseData> entity = restTemplate.exchange(Constants.PS_WEB_URL + "esb/query/view?serviceCode=2001&consumerCode=10015&queryParam={queryParam}", HttpMethod.GET, null, PSResponseData.class,queryParam);
0 0
- restTemplate Not enough variable values availabel
- RestTemplate的异常:Not enough variables available to expand
- [异常解决]java.sql.SQLException: ORA-00947: not enough values
- ORA-00947:Not enough values (没有足够的值)
- You did not supply enough values to fill path parameters
- ValueError: not enough values to unpack (expected 3, got 0)
- ValueError: not enough values to unpack (expected 2, got 1)
- Target-specific Variable Values
- It's not enough...
- Not enough arguments
- Not enough timers available
- gitk not enough memory
- luajit: not enough memory
- execl 编译时的警告: warning: not enough variable arguments to fit a sentinel 解释说明(转载)
- The world is not enough
- xterm get_pty: not enough ptys
- Average is not Fast Enough!
- American Chinese not enough 美中不足
- java创建文件夹和删除文件夹
- CentOS安装ElasticSearch极简手册
- Oracle 存储过程的默认值参数和过程中的事务处理
- HDU 1402 FFT
- 装箱P37
- restTemplate Not enough variable values availabel
- LeetCode OJ-513.Find Bottom Left Tree Value
- Swift 中的SDWebImage类似库Kingfisher
- C# 如何读取配置Web.config中的数据
- RTMP集合消息详解
- android studio--调试---断点调试
- Android系统的版本号与API的对应表
- size_t ssize_t socklen_t 关系
- 关于Android VideoView导致的内存泄漏的问题