method:

@Controller

@RequestMapping("/test")

public String MyController{

@RequestMapping("/begin")

public String hi(HttpServletRequest request){

String name=request.getParameter("name");

System.out.println(name);

return "MyJsp";

url:"http://asus5-pc:8080/springMvc/test/begin?=zhan"

控制台输出:

zhan

restful风格:

method:

@Controller

@RequestMapping("/test")

public String MyController{

@RequestMapping("/begin/{name}")

public String hi(@PathVariable("name") String name){

System.out.println(name);

return "MyJsp";

url:"http://asus5-pc:8080/springMvc/test/begin/zhan.do"

控制台输出:

zhan

最新文章

  1. 工作记录 java
  2. 今天写项目时,突然发现canvas的一些公式不记得了,所以整理了一番,分享给大家。
  3. add host bat
  4. 江湖救急:webbrowser中js文件丢失问题~
  5. python 语料处理(从文件夹中读取文件夹中文件,分词,去停用词,去单个字)
  6. 使用MyBatis链接MySQL
  7. 隐藏NavigationBar 带来的坑
  8. uvision4 ide已停止工作
  9. UITableView 总结
  10. ps -aux返回超过100%
  11. stl_config.h基本宏
  12. Aurora Player 开源啦~~~
  13. vue和angular的区别:
  14. Ubuntu18.04,安装Redis配置远程连接访问和简单使用Redis
  15. 对多字段进行去重 ( Linq 方式 )
  16. php 使用代理IP进行数据抓取
  17. Linux 打包压缩与搜索命令
  18. Java语言支持的3种变量类型
  19. TensorFlow模型加载与保存
  20. zabbix使用企业微信发送告警信息

热门文章

  1. linux中常用的命令大全
  2. [已解决]报错:xlrd.compdoc.CompDocError: Workbook: size exceeds expected 17920 bytes; corrupt?
  3. CF986C
  4. Python之异常抛出机制
  5. Oracle使用存储过程返回查询游标
  6. Nodejs入门级基础+实战
  7. celery使用的小记录
  8. C# 进制转换(二进制、十六进制、十进制互转) 转载 https://www.cnblogs.com/icebutterfly/p/8884023.html
  9. VMware下Ubuntu全屏显示
  10. Ubuntu更换阿里云数据源