Java 玩框架路由。长数据类型
似乎我在路由中定义长变量时遇到了问题。 这是routes文件中的行: 这是处理这条路线的方法:Java 玩框架路由。长数据类型,java,playframework,playframework-2.0,web-development-server,Java,Playframework,Playframework 2.0,Web Development Server,似乎我在路由中定义长变量时遇到了问题。 这是routes文件中的行: 这是处理这条路线的方法: public static Result show(long id) { // handle request here... } 我得到的是错误324: 错误324(net::ERR_EMPTY_RESPONSE):服务器关闭了连接,但未发送任何数据 我认为问题在于长数据类型,因为对于Int,它的工作方式很有魅力。 什么是调整,使其工作 在操作中必须使用Long对象,而不是Long主类型:
public static Result show(long id) {
// handle request here...
}
我得到的是错误324:
错误324(net::ERR_EMPTY_RESPONSE):服务器关闭了连接,但未发送任何数据
我认为问题在于长数据类型,因为对于Int,它的工作方式很有魅力。什么是调整,使其工作 在操作中必须使用
Long
对象,而不是Long
主类型:
public static Result show(Long id) {
// handle request here...
}
public static Result show(Long id) {
// handle request here...
}