Your first Play application

http://www.playframework.com/documentation/2.1.x/JavaTodoList

Play 2.1.2
아주 간단한 예제

> play new todolist //프로젝트 생성
> cd todolist
> play
[todolist] $ run


There is no need to compile the code yourself or restart the server to see the modification. It is automatically reloaded when a change is detected.

- 라우팅 추가
conf/routes
# Home page
GET     /                             controllers.Application.index()
                               
# Tasks         
GET     /tasks                      controllers.Application.tasks()
POST    /tasks                    controllers.Application.newTask()
POST    /tasks/:id/delete       controllers.Application.deleteTask(id: Long)

- Task 모델
- 템플릿 수정
index.scala.html

- Rendering the first page


- form 전송 처리 - 데이터베이스 처리
conf/application
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
...
ebean.default="models.*"
서버 재시작할 필요없음.

EBean (Play’s default ORM) 사용
- 삭제 기능
- Heroku에 배포
...다음 기회에