no suitable HttpMessageConverter found for response type

前端 未结 10 1771
深忆病人
深忆病人 2020-11-30 02:33

Using spring, with this code :

List> messageConverters = restTemplate.getMessageConverters();
for(HttpMessageConverter ht         


        
10条回答
  •  既然无缘
    2020-11-30 02:56

    In addition to all the answers, if you happen to receive in response text/html while you've expected something else (i.e. application/json), it may suggest that an error occurred on the server side (say 404) and the error page was returned instead of your data.

    So it happened in my case. Hope it will save somebody's time.

提交回复
热议问题