title: Spring Feign: Could not extract response: no suitable HttpMessageConverter found for response type
body: <p>I am trying to get a <a href="https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html" rel="nofollow noreferrer">Spring Cloud Netflix Feign</a> client to fetch a bit of JSON over HTTP and convert it to an object. I keep getting this error instead:</p>
  
  <blockquote>
    <p>org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class io.urig.checkout.Book] and content type [application/json;charset=UTF-8]</p>
  </blockquote>
  
  <p>Here's the bit of JSON returned from the remote service:</p>
  
  <pre><code>{
      "id": 1,
      "title": "Moby Dick",
      "author": "Herman Melville"
  }
  </code></pre>
  
  <p>Here's the corresponding class I'm trying to deserialize to:</p>
  
  <pre><code>package io.urig.checkout;
  
  public class Book {
      private long id;
      private String title;
      private String author;
  
      public Book() {}
  
      public Book(long id, String title, String author) {
          super();
          this.id = id;
          this.title = title;
          this.author = author;
      }
  
      public long getId() {
          return id;
      }
      public void setId(long id) {
          this.id = id;
      }
      public String getTitle() {
          return title;
      }
      public void setTitle(String title) {
          this.title = title;
      }
      public String getAuthor() {
          return author;
      }
      public void setAuthor(String author) {
          this.author = author;
      }
  }
  </code></pre>
  
  <p>And here's my Feign client:</p>
  
  <pre><code>package io.urig.checkout;
  
  import java.util.Optional;
  
  import org.springframework.cloud.openfeign.FeignClient;
  import org.springframework.web.bind.annotation.PathVariable;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  import io.urig.checkout.Book;
  
  @FeignClient(name="inventory", url="http://localhost:8080/")
  public interface InventoryClient {
  
      @RequestMapping(method = RequestMethod.GET, value = "books/{bookId}")
      public Optional&lt;Book&gt; getBookById(@PathVariable(value="bookId") Long bookId);
  
  }
  </code></pre>
  
  <p>What do I need to do to get this to work?</p>