play console で model の動作などを確認したい場合
play.core.StaticApplication を new すると良い様です
参照:
https://groups.google.com/d/msg/play-framework/EFYnWC1yYsg/30TGLEQ-q68J
$ play console
[info] Loading project definition from /private/tmp/todolist/project
[info] Set current project to todolist (in build file:/private/tmp/todolist/)
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_35).
Type in expressions to have them evaluated.
Type :help for more information.
scala> new play.core.StaticApplication(new java.io.File("."))
[info] play - database [default] connected at jdbc:postgresql://localhost:5432/todolist
[info] play - Application started (Prod)
res0: play.core.StaticApplication = play.core.StaticApplication@4cdd09a6
scala> models.Task.all()
res1: List[models.Task] = List(Task(1,Complete the tutorial))
scala>
Author And Source
この問題について(play console で model の動作などを確認したい場合), 我々は、より多くの情報をここで見つけました https://qiita.com/kysnm/items/1f9e810405a92bb9b3f5著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .