我正在使用Play 2.4.0并且我一直在尝试按照主页中的教程:https: //playframework.com/,这是针对Play 2.3以及解决了有关Ebean ORM更改的几个问题之后版本2.3到2.4,我遇到以下错误:
Compilation error
value at is not a member of controllers.ReverseAssets
Run Code Online (Sandbox Code Playgroud)
我的index.scala.html:
@(message: String)
@main("Welcome to Play") {
<script type='text/javascript' src="@routes.Assets.at("javascripts/index.js")"></script>
<form action="@routes.Application.addPerson()" method="post">
<input type="text" name="name" />
<button>Add Person</button>
</form>
<ul id="persons">
</ul>
}
Run Code Online (Sandbox Code Playgroud)
我的routes档案:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
POST /person controllers.Application.addPerson()
GET /persons controllers.Application.getPersons()
# Map static resources from the /public …Run Code Online (Sandbox Code Playgroud)