title: Feign Client exception feign.codec.DecodeException: type is not an instance of Class or ParameterizedType: T
body: <p>I am trying to make my feign client generic and this is throwing me an exception when the call is finished.
  Any help is greatly appreciated.</p>
  
  <p>code i am trying:</p>
  
  <pre><code>@PostMapping("/api/{path}")
      &lt;T&gt; T save(@PathVariable("path") String path,
                              @RequestBody T entity)
  </code></pre>
  
  <p>Exception: </p>
  
  <pre><code>
      at org.springframework.cloud.openfeign.support.SpringDecoder.decode(SpringDecoder.java:62)
      at org.springframework.cloud.openfeign.support.ResponseEntityDecoder.decode(ResponseEntityDecoder.java:45)
      at feign.optionals.OptionalDecoder.decode(OptionalDecoder.java:23)
      at feign.SynchronousMethodHandler.decode(SynchronousMethodHandler.java:165)
      at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:133)
      at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
      at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
      at com.sun.proxy.$Proxy208.save(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)```
  </code></pre>