我正在阅读de playframework网站(http://www.playframework.com/)的教程(小电影)。当我尝试编译我的代码时,我收到此错误:
HTTP Verb (GET, POST, ...), include (->) or comment (#) expected
这是我的路线档案:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
POST /ploegen controllers.Application.addPloeg()
Get /ploegen controllers.Application.getPloegen()
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
这是我的application.java文件中的方法:
public static Result getPloegen() {
List<Ploeg> ploegen = Model.Finder(String.class, Ploeg.class).all();
return ok(toJson(ploegen));
}
现在我需要做些什么来解决这个错误,因为我真的不知道这意味着什么。
答案 0 :(得分:0)
尝试更改行:
Get /ploegen controllers.Application.getPloegen()
为:
GET /ploegen controllers.Application.getPloegen()