diff --git a/POSTMAN/JavaBrains- Springboot micro services level-1.postman_collection.json b/POSTMAN/JavaBrains- Springboot micro services level-1.postman_collection.json new file mode 100644 index 0000000..49a88a8 --- /dev/null +++ b/POSTMAN/JavaBrains- Springboot micro services level-1.postman_collection.json @@ -0,0 +1,31 @@ +{ + "info": { + "_postman_id": "cda15b4e-eec8-431d-8578-9d4e070899b6", + "name": "JavaBrains- Springboot micro services level-1", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "865546" + }, + "item": [ + { + "name": "movie-catalog-service", + "item": [ + { + "name": "MovieCatelog", + "request": { + "method": "GET", + "header": [] + }, + "response": [] + } + ] + }, + { + "name": "movie-info-service", + "item": [] + }, + { + "name": "ratings-data-service", + "item": [] + } + ] +} \ No newline at end of file diff --git a/movie-catalog-service/post-man/movie-catalog-service.postman_collection.json b/movie-catalog-service/post-man/movie-catalog-service.postman_collection.json new file mode 100644 index 0000000..1810991 --- /dev/null +++ b/movie-catalog-service/post-man/movie-catalog-service.postman_collection.json @@ -0,0 +1,18 @@ +{ + "info": { + "_postman_id": "7ef40e57-378b-418e-92fc-1d22fd82dba1", + "name": "movie-catalog-service", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "865546" + }, + "item": [ + { + "name": "MovieCatelog", + "request": { + "method": "GET", + "header": [] + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/movie-catalog-service/src/main/java/io/javabrains/moviecatalogservice/resources/CatalogResource.java b/movie-catalog-service/src/main/java/io/javabrains/moviecatalogservice/resources/CatalogResource.java index 5175405..a9016b3 100644 --- a/movie-catalog-service/src/main/java/io/javabrains/moviecatalogservice/resources/CatalogResource.java +++ b/movie-catalog-service/src/main/java/io/javabrains/moviecatalogservice/resources/CatalogResource.java @@ -28,16 +28,15 @@ public class CatalogResource { @RequestMapping("/{userId}") public List getCatalog(@PathVariable("userId") String userId) { - - UserRating userRating = restTemplate.getForObject("http://ratings-data-service/ratingsdata/user/" + userId, UserRating.class); - - return userRating.getRatings().stream() + + UserRating userRating = restTemplate.getForObject("https://ratings-data-service/ratingsdata/user/" + userId, UserRating.class); + return userRating.getRatings().stream() .map(rating -> { - Movie movie = restTemplate.getForObject("http://movie-info-service/movies/" + rating.getMovieId(), Movie.class); + Movie movie = restTemplate.getForObject("https://movie-info-service/movies/" + rating.getMovieId(), Movie.class); return new CatalogItem(movie.getName(), movie.getDescription(), rating.getRating()); }) .collect(Collectors.toList()); - + } } diff --git a/movie-info-service/post-man/movie-info-service.postman_collection.json b/movie-info-service/post-man/movie-info-service.postman_collection.json new file mode 100644 index 0000000..4ef27e7 --- /dev/null +++ b/movie-info-service/post-man/movie-info-service.postman_collection.json @@ -0,0 +1,29 @@ +{ + "info": { + "_postman_id": "7141b34c-7930-46cc-967d-36c31cb708af", + "name": "movie-info-service", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "865546" + }, + "item": [ + { + "name": "movies by movie Id", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8082/movies/1", + "host": [ + "localhost" + ], + "port": "8082", + "path": [ + "movies", + "1" + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/ratings-data-service/post-man/ratings-data-service.postman_collection.json b/ratings-data-service/post-man/ratings-data-service.postman_collection.json new file mode 100644 index 0000000..81ce3fb --- /dev/null +++ b/ratings-data-service/post-man/ratings-data-service.postman_collection.json @@ -0,0 +1,49 @@ +{ + "info": { + "_postman_id": "55451066-7971-4f63-bf0e-28522dd4c0b1", + "name": "ratings-data-service", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "865546" + }, + "item": [ + { + "name": "rating by movie id", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8083/ratingsdata/movies/1", + "host": [ + "localhost" + ], + "port": "8083", + "path": [ + "ratingsdata", + "movies", + "1" + ] + } + }, + "response": [] + }, + { + "name": "user ratings by userid", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8083/user/1", + "host": [ + "localhost" + ], + "port": "8083", + "path": [ + "user", + "1" + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file