我根据本教程http://scala-ide.org/docs/tutorials/play/更新了Scala索引视图文件,并出现以下错误:
我的代码如下:
Application.scala
package controllers
import play.api._
import play.api.mvc._
import models.Quote
object Application extends Controller {
def index = Action {
Ok(views.html.index("Your new application is ready.",Quote("Citer les pensees des autres, c'est regretter de ne pas les avoir trouvees soi-meme.",
"Sacha Guitry")))
}
}
Quote.scala
package models
case class Quote(text: String, author: String)
index.scala
@(message: String, quote: models.Quote)
@main("Welcome to Play 2.1") {
<p>@quote.text<em> - @quote.author</em></p>
}
播放使用以下命令在后台以自动重新加载模式运行
〜运行
我无法理解为什么我收到此编译错误。我甚至尝试过进行全日食。
答案 0 :(得分:0)
where is the error?
没有可用的建议不是错误。如果你得到任何它将在控制台。
日食变化的某些时候并没有立即得到。特别是在Ok()
声明中
你可以在eclipse中清理你的项目并刷新项目,但仍然会忽略它。
编辑:
eclipsfy你的项目再次可以删除
试试play clean update compile eclipse ~run