resttemplate Can not deserialize instance of out of START_ARRAY token 或者 返回LinkHashMap类型数组
1、将返回数据转换为指定类型
错误写法:
@GetMapping("/list")
public List<User> listAll2() {
List<User> users = restTemplate.getForObject("http://microservice-provider-user/list-all", User.class);
for (User user : userList) {
System.out.printl
原创
2022-05-24 17:48:32 ·
477 阅读 ·
0 评论