[英]Adding a class in scala and play2
我在哪里放置新的类文件,以及如何将其导入应用程序控制器中?
New classes for both the Java and Scala versions of Play 2 are meant to be a part of the app/models/
package. Play 2的Java和Scala版本的新类都应成为
app/models/
包的一部分。 And the import would simply be import models.className
. 导入将简单地是
import models.className
。
You should check out the tutorial they have listed on the PlayFramework site, it should be of use to you, and can be found here: http://www.playframework.org/documentation/2.0.1/ScalaTodoList 您应该查看一下PlayFramework网站上列出的教程,该教程对您有用,可以在以下位置找到: http ://www.playframework.org/documentation/2.0.1/ScalaTodoList
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.