You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: