【发布时间】:2020-02-14 10:47:37
【问题描述】:
我正在使用 atom/xml,我需要将其转换为 java 对象。 代码如下,我收到转换错误
代码:
ResponseEntity<BusinessPartner> response = restTemplate.exchange(url + "/BP_HEADERSet('100000010')", HttpMethod.GET, entity, BusinessPartner.class);
错误:
"message": "Could not extract response: no suitable HttpMessageConverter found for response type [class com.leaseplan.insuranceaccounting.models.BusinessPartner] and content type [application/atom+xml;charset=utf-8;type=entry]",
BusinessPartner 是我的自定义类。从 url,我得到原子格式的响应 <content type="application/xml">
【问题讨论】:
标签: json spring-boot resttemplate