Map Nested JSON Objects to Java Classes with Spring RestTemplate

前端 未结 7 1433
南旧
南旧 2021-02-08 12:17

I know this may be simple. However, I just can\'t get it to work.

So I am trying to use Spring RestTemplate to map my JSON data. I have following JSON response from a re

7条回答
  •  一个人的身影
    2021-02-08 12:58

    If you need only print data, you can do this

    RestTemplate restTemplate = new RestTemplate();
    ResponseEntity response = restTemplate.getForEntity(
        "your url",
        String.class);
    
    System.out.println(response);
    

提交回复
热议问题