Is your feature request related to a problem? Please describe.
I used @RequestMapping on class level to define a root URL path, like @RequestMapping("api/v1/users") class UsersApi { ... methods all related to users ... }. But this commit removed support for it, so now I have to copy-paste "api/v1/users/" into all my methods.
The commit seems to justify it as a discouragement for sharing the feign interface with server controller classes. I think a better solution would be to add code to Spring MVC that would detect @FeignClient annotation on a @Controller's interface and throw an error that way, so we can bring back @RequestMapping. I know that Java doesn't allow reading interface's annotations but Feign does it somehow, maybe Spring MVC can do that too? If it can't, then I propose to introduce a feign-specific class-level annotation for root URL path.
Note: @RequestMapping allows for other things to be configured for all methods, like content type.
Describe alternatives you've considered A lot of copy-paste seems to be the only way.
Comment From: OlgaMaciaszek
Hello, @Sam-Kruglov, this was done on purpose (see https://tanzu.vmware.com/security/cve-2021-22044 and https://github.com/spring-cloud/spring-cloud-openfeign/issues/547). It was always discouraged as a bad practice in the docs. Since it also caused a security issue, the team has decided to remove it.