Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping("/{category}")
- public String getProductsByCategory(@PathVariable("category") String productCategory, Model model) {
- model.addAttribute("products", productService.getProductsByCategory(productCategory));
- return "products";
- }
- @RequestMapping("/{manufacturer}")
- public String getProductsByManufacturer(@PathVariable("manufacturer") String productManufacturer, Model model) {
- model.addAttribute("products", productService.getProductsByManufacturer(productManufacturer));
- return "products";
- }
Advertisement
Add Comment
Please, Sign In to add comment