学习 play! 框架(Part One)

Creating a new application

1
2
3
$ activator new my-first-app play-java
or
$ activator new # prompt

The standard application layout

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
app -> Application sources
└ assets -> Compiled asset sources
└ stylesheets -> Typically LESS CSS sources
└ javascripts -> Typically CoffeeScript sources
└ controllers -> Application controllers
└ Application.java
└ models -> Application business layer
└ views -> Templates
└ index.scala.html
└ main.scala.html
└ utils -> add your own packages here
build.sbt -> Application build script
conf -> Configurations files and other non-compiled resources (on classpath)
└ application.conf -> Main configuration file
└ routes -> Routes definition
public -> Public assets
└ stylesheets -> CSS files
└ javascripts -> Javascript files
└ images -> Image files
project -> sbt configuration files
└ build.properties -> Marker for sbt project
└ plugins.sbt -> sbt plugins including the declaration for Play itself
lib -> Unmanaged libraries dependencies
logs -> Standard logs folder
└ application.log -> Default log file
target -> Generated stuff
└ scala-2.10.0
└ cache
└ classes -> Compiled class files
└ classes_managed -> Managed class files (templates, ...)
└ resource_managed -> Managed resources (less, ...)
└ src_managed -> Generated sources (templates, ...)
test -> source folder for unit or functional tests
ApplicationTest.java
IntegrationTest.java

more >>