BAEL-947 - moving from @GetMapping to @RequestMapping on account of https://github.com/spring-cloud/spring-cloud-netflix/issues/760
This commit is contained in:
parent
18b56311e5
commit
d87683f9f9
|
@ -1,10 +1,14 @@
|
||||||
package com.baeldung.spring.cloud.bootstrap.gateway.client.book;
|
package com.baeldung.spring.cloud.bootstrap.gateway.client.book;
|
||||||
|
|
||||||
import org.springframework.cloud.netflix.feign.FeignClient;
|
import org.springframework.cloud.netflix.feign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
@FeignClient(value = "book-service")
|
@FeignClient(value = "book-service")
|
||||||
public interface BooksClient {
|
public interface BooksClient {
|
||||||
@GetMapping("/books/{bookId}")
|
|
||||||
|
@RequestMapping(value = "/books/{bookId}", method = {RequestMethod.GET})
|
||||||
Book getBookById(@PathVariable("bookId") Long bookId);
|
Book getBookById(@PathVariable("bookId") Long bookId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.List;
|
||||||
|
|
||||||
@FeignClient(value = "rating-service")
|
@FeignClient(value = "rating-service")
|
||||||
public interface RatingsClient {
|
public interface RatingsClient {
|
||||||
@GetMapping("/ratings")
|
|
||||||
|
@RequestMapping(value = "/ratings", method = {RequestMethod.GET})
|
||||||
List<Rating> getRatingsByBookId(@RequestParam("bookId") Long bookId, @RequestHeader("Cookie") String session);
|
List<Rating> getRatingsByBookId(@RequestParam("bookId") Long bookId, @RequestHeader("Cookie") String session);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue