我正在使用Play Framework构建我的第一个控制器。我收到错误了:
<table>
<thead>
<tr>
<th></th>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>(1,1)</td>
<td>(1,2)</td>
<td>(1,3)</td>
<td>(1,4)</td>
</tr>
<tr>
<th>Row 2</th>
<td>(2,1)</td>
<td>(2,2)</td>
<td>(2,3)</td>
<td>(2,4)</td>
</tr>
</tbody>
我的routes.conf文件如下:
Compilation error value getAll is not a member of controllers.api.protocol.Period
和&#34; controllers / api / protocol / Period.java&#34;看起来像:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
GET /api/protocol/period controllers.api.protocol.Period.getAll()
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
我迷路了。
答案 0 :(得分:1)
那很好,也很受欢迎。 :)
从static
移除public static Result getAll()
,您已经排序了。