Spring RestTemplate gives “500” error but same URL, credentails works in RestClient and Curl

后端 未结 7 1749
眼角桃花
眼角桃花 2020-12-30 03:06

An Url, Credentials works in RestClient UI as well as with Curl where as i\'m getting \"500\" error when access the same via Spring RestTemplate.

I am using the foll

相关标签:
7条回答
  • 2020-12-30 03:36

    This may happen if your data contract class is missing default constructor - so Jackson fails to construct it. You can try solve this issue by adding a private default constructor to your class (despite it is private, Jackson will be able to construct your class instance).

    0 讨论(0)
提交回复
热议问题