我有一个已定义的可用的Feign接口:
@FeignClient("content-link-service")
public interface ContentLinkServiceClient {
@RequestMapping(method = RequestMethod.GET, value = "/{trackid}/links")
List<Link> getLinksForTrack(@PathVariable("trackid") Long trackId);
}
如果我改用@RequestLine
@FeignClient("content-link-service")
public interface ContentLinkServiceClient {
@RequestLine("GET /{trackid}/links")
List<Link> getLinksForTrack(@Param("trackid") Long trackId);
}
我遇到了异常
Caused by: java.lang.IllegalStateException: Method getLinksForTrack not annotated with HTTP method type (ex. GET, POST)
为什么会出现这种情况?