我正在开发一个Spring MVC控制器项目,其中我从浏览器中发出了一个GET URL调用 -
以下是我从浏览器中发出GET调用的URL-
http://127.0.0.1:8080/testweb/processing?workflow=test&conf=20140324&dc=all
以下是在浏览器中点击后发起调用的代码 -
@RequestMapping(value = "processing", method = RequestMethod.GET)
public @ResponseBody ProcessResponse processData(@RequestParam("workflow") final String workflow,
@RequestParam("conf") final String value, @RequestParam("dc") final String dc) {
System.out.println(workflow);
System.out.println(value);
System.out.println(dc);
// some other code
}
问题陈述:
现在有什么方法可以从某个头部提取IP地址吗?也就是说,我想知道调用上面URL的人使用的IP地址是什么。这是否可能做到?