@Controller public class TodoController extends Object
Modifier and Type | Field and Description |
---|---|
private static Logger |
log |
private TodoService |
todoService |
Constructor and Description |
---|
TodoController() |
Modifier and Type | Method and Description |
---|---|
String |
index(Model model) |
String |
todoAddEditSave(int id,
Model model,
TodoCommand todoCommand,
BindingResult bindingResult) |
String |
todoAddEditShow(int id,
Model model) |
String |
todoDelete(int id,
Model model) |
@Autowired private TodoService todoService
public TodoController()
@RequestMapping(value="/todo/", method=GET) public String index(Model model)
model
- @RequestMapping(value="/todo/{id}/edit", method=GET) public String todoAddEditShow(@PathVariable(value="id") int id, Model model)
id
- model
- @RequestMapping(value="/todo/{id}/edit", method=POST) public String todoAddEditSave(@PathVariable(value="id") int id, Model model, @ModelAttribute(value="todo") TodoCommand todoCommand, BindingResult bindingResult)
id
- model
- todoCommand
- bindingResult
- @RequestMapping(value="/todo/{id}/delete", method=GET) public String todoDelete(@PathVariable(value="id") int id, Model model)
Copyright © 2016. All rights reserved.