From be9595508799d1558200f8145972b85b8d1a3d0f Mon Sep 17 00:00:00 2001 From: Bakhshi Moeez <107806938+BakhshiMoeez@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:43:39 +0500 Subject: [PATCH] Update AdminController.java Using @PostMapping instead of @RequestMapping to enhance readability. --- .../JtSpringProject/controller/AdminController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JtProject/src/main/java/com/jtspringproject/JtSpringProject/controller/AdminController.java b/JtProject/src/main/java/com/jtspringproject/JtSpringProject/controller/AdminController.java index b5b2f5b0..adb19c57 100644 --- a/JtProject/src/main/java/com/jtspringproject/JtSpringProject/controller/AdminController.java +++ b/JtProject/src/main/java/com/jtspringproject/JtSpringProject/controller/AdminController.java @@ -106,7 +106,7 @@ public ModelAndView getcategory() { return mView; } } - @RequestMapping(value = "categories",method = RequestMethod.POST) + @PostMapping("/categories") public String addCategory(@RequestParam("categoryname") String category_name) { System.out.println(category_name);