라우트에 Index 액션 추가
/posts URL로 접근했을 때 요청이 포스트 컨트롤러의 Index 액션으로 전달되게 라우트를 설정해 보자. conf/routes 파일에 GET /posts Post.Index를 추가하면 된다.
▼ conf/routes
GET / Home.Index
## Post
GET /posts Post.Index
## Ignore favicon requests
GET /favicon.ico 404
## Map static resources from the /app/public folder to the /public path
GET /public/*filepath Static.Serve("public")
## Catch all
* /:controller/:action :controller.:action
라우트 정보를 정의할 때 순서에 주의해야 한다. Revel은 conf/routes 파일에 정의한 순서대로 라우팅 처리를 한다. * /:controller/:application :controller.:action 아래에 정의하면 모든 url을 /:controller/:action으로 해석하여 :controller.:action으로 라우팅 처리를 해버린다.