如何将你的路线映射到你的控制器方法

1.routes 中:

GET /books controllers.BooksController.index
GET /books/create controllers.BooksController.create()
GET /books/:id controllers.BooksController.show(id :Integer)
GET /books/edit/:id controllers.BooksController.edit(id:Integer)
POST /books/edit controllers.BooksController.update()
POST /books/create controllers.BooksController.save()
GET /books/delete/:id controllers.BooksController.destroy(id:Integer)

2.测试:localhost:9000/books,有回应此时还没有内容模型
发布了132 篇原创文章 · 获赞 35 · 访问量 13万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章