@Controller
public class CategoryController
extends java.lang.Object
| Constructor and Description |
|---|
CategoryController() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
categories(org.springframework.ui.Model model)
Shows all categories.
|
java.lang.String |
category(org.springframework.ui.Model model,
long id)
Shows all recipes that belong to a given category.
|
@RequestMapping(method=GET,
value="/categories")
public java.lang.String categories(org.springframework.ui.Model model)
model - model that belongs to the view@RequestMapping(method=GET,
value="/category/{id}")
public java.lang.String category(org.springframework.ui.Model model,
@PathVariable(value="id")
long id)
model - model that belongs to the viewid - if of the category