Experimenting in a Scala console

A Scala console is very handy when you're working on a Scala project. The same console is available in our Play application's console as well. All that we need to do to get the Scala console is execute the console command in our application console:

[app]$ console
[info] Compiling 3 Scala sources to /home/app/target/scala-2.10/classes...
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_60).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

However, we can only call methods from models or utils. If classes or objects within these packages utilize Play.application.configuration or attempt to fetch data from ...

Get Mastering Play Framework for Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.