赞
踩
在使用restTemplate时候本地返回结果为401 Unauthorized: [no body],但是使用postman直接测试远程地址是可以的,如下图
restTemplate的日志返回信息不完整,需要配置restTemplate返回的详细信息。在构建restTemplate的时候使用下列方法。
RestTemplate restTemplate = new RestTemplate();
restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
我这边错误返回结果为少了一些包。在pom中引入即可。
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。