LoginSignup
1
1

More than 5 years have passed since last update.

Play Framework-routes設定

Last updated at Posted at 2014-09-03

routes設定が軽く調べた内容のメモ
Play Frameworkのルータ設定は以下のファイルで行っている

/path/to/project/config/routes
play new [プロジェクト名]

コマンドでアプリを生成するとroutesは以下のようになっている

# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~

# Home page
GET     /                           controllers.Application.index

# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)

上記設定からわかるようにroutesファイルの設定方法は以下の形式になっているらしい

[METHOD] [PATH] [CONTROLLER-ACTION]

より詳細は以下を読む

https://www.playframework.com/documentation/2.1.1/ScalaRouting
http://blog.livedoor.jp/tattyamm/archives/4116069.html
http://www.atmarkit.co.jp/ait/articles/1302/21/news016.html
http://netmark.jp/2012/12/play-framework-routing.html
http://playframework.blog.fc2.com/blog-entry-6.html

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1