I'm using SpringCloud openfeign to call another micro service that isn't owned by our team. When I define this feignclient.
@FeignClient(name="test, url="/test")
public interface MyFeignClient {
@GetMapping("/hello)
MyCustomRespone getValuesFromOtherService(@RequestParam String name, @RequestParam int id);
}
When calling this, an exception occurs: Spring Feign: Could not extract response: no suitable HttpMessageConverter found for response type
Then I tried to add feign-jackson from io.github.openfeign
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-jackson</artifactId>
</dependency>
But it still shows the same exception. Then I noticed that the rest api I'm calling return's context-type is "text/html". I can analyze it by using ObjectMapper, but it doesn't seems to be a good way to do it.
So is there a way to fix this, Note that I cannot modify the api that not belong to out team.