0
モデルブック。SpringブートのSpringInputGeneralFieldAttrProcessor
サービス、コントローラuntuk halamanブック
@RequestMapping(value="/book/",method = RequestMethod.POST)
public String saveBook(@ModelAttribute("book") Book book, Model model){
bookService.saveModal(model, book);
return "redirect:/book";}
私は何をすべきサービス
public Model saveModal(Model model, Book book){
model.addAttribute("categories",categoryDaoInterface.getAllActive());
model.addAttribute("book", new Book());
bookDaoInterface.saveBook(book);
return model;}
を使用してコントローラにモデルを接続しますか?