HTTP 动词 (GET, POST, ...), 包含 (->) 或注释 (#) 预期



我正在学习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)

这是我的应用程序.java文件中的方法:

    public static Result getPloegen() {
    List<Ploeg> ploegen = Model.Finder(String.class, Ploeg.class).all();
    return ok(toJson(ploegen));
    }

现在我该怎么做才能解决这个错误,因为我真的不知道这意味着什么。

尝试更改行:

Get     /ploegen                    controllers.Application.getPloegen()

自:

GET     /ploegen                    controllers.Application.getPloegen()

最新更新