【发布时间】:2015-11-24 16:52:14
【问题描述】:
我对 Scala 还是很陌生,我也在学习 Play。我看到 Play 中使用了以下构造
def list = Action {
val products = Product.findAll
Ok(views.html.products.list(products))
}
我不知道是什么
Action {}
确实如此。 Action是方法的返回值吗?如果我想了解更多,这个结构叫什么?
【问题讨论】: