From 227c8eb6c99f8d45f5e31305cf66ee611a6f216d Mon Sep 17 00:00:00 2001 From: venkatesh Date: Mon, 21 Nov 2022 08:40:32 +0530 Subject: [PATCH 1/5] Post man added --- ...o services level-1.postman_collection.json | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 POSTMAN/JavaBrains- Springboot micro services level-1.postman_collection.json 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 From f4021167c36375e5a1259aa3291875e96445a25b Mon Sep 17 00:00:00 2001 From: venkatesh Date: Mon, 21 Nov 2022 08:55:07 +0530 Subject: [PATCH 2/5] Post man added --- ...ie-catalog-service.postman_collection.json | 18 +++++++ ...movie-info-service.postman_collection.json | 29 +++++++++++ ...tings-data-service.postman_collection.json | 49 +++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 movie-catalog-service/post-man/movie-catalog-service.postman_collection.json create mode 100644 movie-info-service/post-man/movie-info-service.postman_collection.json create mode 100644 ratings-data-service/post-man/ratings-data-service.postman_collection.json 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-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 From b82998a5ea043c32140c47f0bf7f2e1f9ecafb7a Mon Sep 17 00:00:00 2001 From: venkatesh Date: Fri, 25 Nov 2022 16:49:50 +0530 Subject: [PATCH 3/5] Spaces removed --- .../moviecatalogservice/resources/CatalogResource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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..771121f 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 @@ -30,8 +30,7 @@ public class CatalogResource { public List getCatalog(@PathVariable("userId") String userId) { UserRating userRating = restTemplate.getForObject("http://ratings-data-service/ratingsdata/user/" + userId, UserRating.class); - - return userRating.getRatings().stream() + return userRating.getRatings().stream() .map(rating -> { Movie movie = restTemplate.getForObject("http://movie-info-service/movies/" + rating.getMovieId(), Movie.class); return new CatalogItem(movie.getName(), movie.getDescription(), rating.getRating()); From cf7dcf4133dc944c346febf9a8c2e74463229718 Mon Sep 17 00:00:00 2001 From: venkatesh Date: Fri, 25 Nov 2022 16:52:32 +0530 Subject: [PATCH 4/5] https added --- .../moviecatalogservice/resources/CatalogResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 771121f..ead518a 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 @@ -29,10 +29,10 @@ 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); + 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()); From c76e720ff5e2c0e18b95eda4aaf132b565f61fdd Mon Sep 17 00:00:00 2001 From: venkatesh Date: Fri, 25 Nov 2022 16:55:34 +0530 Subject: [PATCH 5/5] content changed --- .../moviecatalogservice/resources/CatalogResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3cfe3ee..a95de41 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 @@ -14,6 +14,6 @@ public class CatalogResource { @RequestMapping("/{userId}") public List getCatalog(@PathVariable("userId") String userId) { - return Collections.singletonList(new CatalogItem("Test", "Test Desc", 4)); + return Collections.singletonList(new CatalogItem("Test", "Test Description", 4)); } }