-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Description
When I use Feign Inheritance, I get the following errors:
Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'xxxx.UserClient' method
xxx.UserClient#getUser(Long)
to {GET [/v1/users/{id}]}: There is already 'userResource' bean method
xxx.UserResource#getUser(Long) mapped.
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$MappingRegistry.validateMethodMapping(AbstractHandlerMethodMapping.java:662)Because I added the @RequestMapping annotation on the UserService class, just like that:
@RequestMapping("/v1")
public interface UserService {
@RequestMapping(method = RequestMethod.GET, value ="/users/{id}")
User getUser(@PathVariable("id") long id);
}So Spring MVC thinks that UserClient is also a handler,This will conflict with the UserResource.
Can I submit a pull request to fix this problem?
Metadata
Metadata
Assignees
Labels
No labels