我在游戏中看到了! 2.0有Http.Context.current()
http://www.playframework.org/documentation/api/2.0/java/play/mvc/Http.Context.html#current()
但是在游戏中! 1.2.4如何获取当前HTTP请求的IP地址?
谢谢。
最佳答案
如果您在 Controller 内,则可以执行
request.remoteAddress;
否则,您需要做
Http.Request.current.get().remoteAddress;
关于playframework - 如何在Java Play 1.2.4中获取传入的请求IP地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9813184/