1
我正在使用Play框架开发Web应用程序。我想通过动态URI传递一个变量。我正在按照here所示的示例进行操作。不过,我收到此错误:Play Framework无法识别路径参数
not enough arguments for method showClients: (clientId: Long)play.mvc.Result. Unspecified value parameter clientId.
路线文件:
GET /clients/{clientId} controllers.Application.showClients
控制器代码:
public static Result showClients(Long clientId) {
Client c = clientFinder.byId(clientId);
return ok(client.render(c));
}
URL
http://localhost:9000/clients/1
有谁看到一个问题,我码?在Google搜索后,我发现了类似的问题,但没有人遇到完全相同的问题,所以我认为这很简单。谢谢您的帮助。