How do I log response in Spring RestTemplate?

后端 未结 5 1362
滥情空心
滥情空心 2020-12-09 18:12

I am using RestTemplate to make calls to a web service.

String userId = restTemplate.getForObject(createUserUrl, String.class);

If this fai

5条回答
  •  [愿得一人]
    2020-12-09 18:44

    If you used swagger to generate the RestTemplate based client then in the ApiClient there is a public method setDebugging and you can set to true or false and then I was able to see whats going on. Hope this helps. I used latest swager generator cli I think its 2.9 or something

提交回复
热议问题