Guest User

Untitled

a guest
Jul 30th, 2015
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1.     @RequestMapping("/{category}")
  2.     public String getProductsByCategory(@PathVariable("category") String productCategory, Model model) {
  3.         model.addAttribute("products", productService.getProductsByCategory(productCategory));
  4.         return "products";
  5.     }
  6.  
  7.     @RequestMapping("/{manufacturer}")
  8.     public String getProductsByManufacturer(@PathVariable("manufacturer") String productManufacturer, Model model) {
  9.         model.addAttribute("products", productService.getProductsByManufacturer(productManufacturer));
  10.         return "products";
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment