title: Setup Feign client and Resource implementation in the same application
body: <p>I have following class hierarchy</p>
  
  <pre><code>@RequestMapping("/resource")
  interface Resource {
    @GetMapping
    String hello(); 
  }
  
  @FeignClient(name = "resource")
  interface ResourceFeign extends Resource {
  
  }
  
  @RestController
  class ResourceImpl implements Resource {
    // implementation ommitted
  }
  </code></pre>
  
  <p>How can I setup all of them without getting following error</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot
    map 'com.example.client.ResourceFeign' method 
    public abstract java.lang.String
    com.example.rest.Resource.hello()
    to {[/resource],methods=[GET]}: There is already
    'resourceImpl' bean method public
    String com.example.rest.ResourceImpl.hello()
    mapped.   at
    org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$MappingRegistry.assertUniqueMethodMapping(AbstractHandlerMethodMapping.java:576)</p>
  </blockquote>