From f7b9ed2a4b43dae946c0813999440e7eccd7337a Mon Sep 17 00:00:00 2001 From: Aditya Kalambe Date: Sat, 16 Mar 2024 02:39:24 +0530 Subject: [PATCH] Service --- src/main/java/com/products/service/ProductService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/products/service/ProductService.java b/src/main/java/com/products/service/ProductService.java index 82ee801..92e2e39 100644 --- a/src/main/java/com/products/service/ProductService.java +++ b/src/main/java/com/products/service/ProductService.java @@ -101,7 +101,7 @@ public boolean updateProduct(Long productId, Product updatedProduct) { * Add Default Products * * */ - public void addDefaultProducts(){ + public String addDefaultProducts(){ List allCategories = new LinkedList<>(categoryRepository.findAll()); System.out.println("\n\n\n\n"); long index = productRepository.count()+1; @@ -116,5 +116,6 @@ public void addDefaultProducts(){ productRepository.save(p); } } + return "Default products added successfully!"; } }