@ResponseBody
@RequestMapping(value="/ip", method=RequestMethod.GET)
public String getIP(HttpServletRequest request, HttpServletResponse response){
return request.getRemoteAddr();
}

直接在参数中指定,mvc会自动注入

最新文章

  1. WCF入门教程(五)配置文件
  2. 基本动画CABasicAnimation - 完成之后闪回初始状态
  3. 【转】ACM训练计划
  4. linux_oracle_healthcheck.sh
  5. webapi 中使用 protobuf
  6. 在 WinForm 中使用 Direct2D
  7. 新浪SAE数据库连接demo和说明
  8. 利用curl并发来提高页面访问速度
  9. (02)odoo自定义模块
  10. MongoDB 学习笔记(二)—— MongoDB Shell
  11. [nowCoder] 子数组最大乘积
  12. Python 异常处理--raise函数用法
  13. 【USACO 2.2.3】循环数
  14. Sort list by merge sort
  15. 【.net 深呼吸】监听剪贴板更新(针对Vista之后系统)
  16. Android 导入引用第三方项目
  17. PHP 实例 AJAX 与 MySQL
  18. PDF怎么添加文字水印与图片水印
  19. ftp无法上传问题
  20. win10安装MongoDB提示 the domain,user name and/or password are incorrect. Remember to use "." for the domain if the account is on the local machine.

热门文章

  1. <<易货>>项目Postmortem结果
  2. [置顶] 将项目从tomcat 迁移到JBoss
  3. [转载] 理解 epoll 的事件触发机制
  4. 09 高效的PL/SQL程序设计
  5. MonkeyRunner学习(2)常用命令
  6. [html] Webp、Apng图片格式
  7. 强制关闭tomcat
  8. xmpp怎么让群主踢人?
  9. HBase之过滤器
  10. static final的理解