似乎我在定义路径中的长变量时有问题。这是路由文件中的行:
GET /topic/:id controllers.Topics.show(id: Long)
这是处理这条路线的方法:
public static Result show(long id) {
// handle request here...
}
我得到的是324错误:
错误324 (net::ERR_EMPTY_RESPONSE):服务器没有发送任何数据就关闭了连接。
我认为问题在于长数据类型,因为对于Int,它就像一种魅力。
是什么使它起作用的?
发布于 2012-08-06 01:20:15
您必须在操作中使用Long
对象而不是long
主类型:
public static Result show(Long id) {
// handle request here...
}
https://stackoverflow.com/questions/11825480
复制相似问题