I have a working Feign interface that is defined as:
@FeignClient("content-link-service")
public interface ContentLinkServiceClient {
@RequestMapping(method = RequestMethod.GET, value = "/{trackid}/links")
List<Link> getLinksForTrack(@PathVariable("trackid") Long trackId);
}
If I change this to use @RequestLine
@FeignClient("content-link-service")
public interface ContentLinkServiceClient {
@RequestLine("GET /{trackid}/links")
List<Link> getLinksForTrack(@Param("trackid") Long trackId);
}
I get an exception
Called: java.lang.IllegalStateException: the getLinksForTrack method is not annotated with the HTTP method type (for example, GET, POST)
Any ideas why?
source
share