标签:测试 log protect tcl template pen 类型 factor new
HttpHeaders httpHeaders = new HttpHeaders(); 设置请求头
MultiValueMap<String, String> requestBody = new LinkedMultiValueMap<>(); 设置body
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(requestBody, httpHeaders);
ResponseEntity<Map> exchange = restTemplate.exchange("url", HttpMethod.PUT, requestEntity, Map.class);
踩坑 获取body的值时 是一个数组类型 报错 500 服务器内部错误
可发测试日志 打印log 查看 传参数接收格式
protected final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(this.getClass());
标签:测试 log protect tcl template pen 类型 factor new
原文地址:https://www.cnblogs.com/yuguohua/p/12917563.html