Merge pull request #2153 from eugenp/BAEL-957

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:
slavisa-baeldung 2017-06-25 23:17:50 +02:00 committed by GitHub
commit b7fbefa91b
2 changed files with 8 additions and 3 deletions

View File

@ -1,10 +1,14 @@
package com.baeldung.spring.cloud.bootstrap.gateway.client.book;
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")
public interface BooksClient {
@GetMapping("/books/{bookId}")
@RequestMapping(value = "/books/{bookId}", method = {RequestMethod.GET})
Book getBookById(@PathVariable("bookId") Long bookId);
}

View File

@ -11,6 +11,7 @@ import java.util.List;
@FeignClient(value = "rating-service")
public interface RatingsClient {
@GetMapping("/ratings")
@RequestMapping(value = "/ratings", method = {RequestMethod.GET})
List<Rating> getRatingsByBookId(@RequestParam("bookId") Long bookId, @RequestHeader("Cookie") String session);
}