Describe the bug Feign Inheritance has conflicts with fallback classs When the @RequstMapping appears on the class header。
It will be caused exception
Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'com.gitee.helloworlddemo.openfeign.consumer.resilience4j.client.SecondClinet' method
*.SecondClinet#hello()
@FeignClient(url = "${second.url}", name = "secondClient", fallback = SecondFallBack.class)
@RequestMapping("/api/second")
public interface SecondClinet {
@RequestMapping("/hello")
String hello();
}
It's normal
@FeignClient(url = "${second.url}", name = "secondApi", fallback = SecondFallBack.class)
public interface SecondClinet {
@RequestMapping("/api/second/hello")
String hello();
}
I think both of these should be running fine.
Comment From: munan56
When @RequestMapping is on the interface, he considers feignclient to be a handle. This means that both the fallback class and feignclient are used as handlers. is this normal?
Comment From: munan56
When @RequestMapping is on the interface, he considers feignclient to be a handle. This means that both the fallback class and feignclient are used as handlers. is this normal?
I know how to solve it (rewrite isHandlefang), but is this kind of problem normal?
Comment From: cbezmen
I think it is Duplicate of #564 . Please check #564
Comment From: munan56
I think it is Duplicate of #564 . Please check #564
sorry,I will close the issue.