study-note

4. Routing

conf/routesファイルで「どのURLに対してどのControllerのどのメソッドを呼ぶか」を定義

目次

基本構文

GET     /hello           controllers.HomeController.hello
POST    /submit          controllers.FormController.submit

クエリパラメータ/パスパラメータ

クエリパラメータ

パスパラメータ

GET   /hello/:name     controllers.HomeController.hello(name: String)

複数パラメータの指定例

GET   /user/:id/profile/:section    controllers.UserController.profile(id: Long, section: String)


5. Model