title: Encode and Decode ResponseEntity when using Feign and Spring MVC?
body: <p>I'm trying to use dynamically feign. But i have many issues when converting the response from RequestMapping.</p>
  
  <p><strong>Controller.java :</strong></p>
  
  <pre><code>@RequestMapping("/users")
  public ResponseEntity&lt;List&lt;User&gt;&gt; sendUsers
  </code></pre>
  
  <p><strong>MyFeignClient.java :</strong></p>
  
  <pre><code>public interface MyFeignClient {
  
  @RequestLine(value="GET /api/users")
  ResponseEntity&lt;List&lt;User&gt;&gt; getUsers();}
  </code></pre>
  
  <p><strong>MainClass.java :</strong></p>
  
  <pre><code>MyFeignClient callService = Feign.builder()
              .encoder(new Encoder.Default())
              .decoder(new Decoder.Default())
              .requestInterceptor(new FeignConfig(props).getJwtRequestInterceptor())
              .target(MyFeignClient.class, "http://localhost:8710");
  </code></pre>
  
  <p>And then :</p>
  
  <pre><code>ResponseEntity&lt;List&lt;User&gt;&gt; txnPool = callService.getUsers();
  </code></pre>
  
  <p>But i have the following error : </p>
  
  <blockquote>
    <p>feign.codec.DecodeException User is not a type supported by this decoder</p>
  </blockquote>
  
  <p>How can i fix that?</p>