Coder Social home page Coder Social logo

Comments (10)

cbornet avatar cbornet commented on June 18, 2024

See spring-cloud/spring-cloud-netflix#466

from spring-cloud-openfeign.

dsyer avatar dsyer commented on June 18, 2024

Clarification: ut's only a problem if you have both a @FeignClient and a @Controller with the same type-level annotation (e.g. if they share an interface). Since this makes very little sense for a real application, it's not super urgent to do anything on our side (and it would take a change in Spring Framework anyway) to support it. Documentation is definitely a good idea if anyone wants to propose a change.

from spring-cloud-openfeign.

cbornet avatar cbornet commented on June 18, 2024

Note : in a spring-boot app, it crashes if you have both a @FeignClient and a FeignHystrixCallback implementing the interface because Spring-MVC complains about ambiguous path mapping.

from spring-cloud-openfeign.

dsyer avatar dsyer commented on June 18, 2024

Right, yes. That's worth documenting as well: you can't use fallback= in @FeignClient if there is a @RequestMapping on the interface.

from spring-cloud-openfeign.

cbornet avatar cbornet commented on June 18, 2024

It also gets scanned by springfox and probably other tools. Lots of worries 😄 ...

from spring-cloud-openfeign.

yuliangjin1985 avatar yuliangjin1985 commented on June 18, 2024

Yes, when I used swagger and there are two controller and feignclient but accidently they have the same RequestMapping, then there are IllegalStateException: Ambiguous mapping, and the project failed starting.

from spring-cloud-openfeign.

jenimal avatar jenimal commented on June 18, 2024

Hi @OlgaMaciaszek give me something easy so I cam step through a pull and remerge "the right way"

from spring-cloud-openfeign.

OlgaMaciaszek avatar OlgaMaciaszek commented on June 18, 2024

@jenimal you can work on this issue.

from spring-cloud-openfeign.

OlgaMaciaszek avatar OlgaMaciaszek commented on June 18, 2024

Will be switching it from a documentation-only issue to an enhancement. We think using @RequestMapping over @FeignClient interfaces is a bad practice and are going to remove the support for creating Feign clients annotated with @RequestMapping on interface level.

from spring-cloud-openfeign.

OlgaMaciaszek avatar OlgaMaciaszek commented on June 18, 2024

Done with d6783a6.

from spring-cloud-openfeign.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.