springMvc框架之Restful风格
2024-09-02 06:45:47
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
最新文章
- 工作记录 java
- 今天写项目时,突然发现canvas的一些公式不记得了,所以整理了一番,分享给大家。
- add host bat
- 江湖救急:webbrowser中js文件丢失问题~
- python 语料处理(从文件夹中读取文件夹中文件,分词,去停用词,去单个字)
- 使用MyBatis链接MySQL
- 隐藏NavigationBar 带来的坑
- uvision4 ide已停止工作
- UITableView 总结
- ps -aux返回超过100%
- stl_config.h基本宏
- Aurora Player 开源啦~~~
- vue和angular的区别:
- Ubuntu18.04,安装Redis配置远程连接访问和简单使用Redis
- 对多字段进行去重 ( Linq 方式 )
- php 使用代理IP进行数据抓取
- Linux 打包压缩与搜索命令
- Java语言支持的3种变量类型
- TensorFlow模型加载与保存
- zabbix使用企业微信发送告警信息
热门文章
- linux中常用的命令大全
- [已解决]报错:xlrd.compdoc.CompDocError: Workbook: size exceeds expected 17920 bytes; corrupt?
- CF986C
- Python之异常抛出机制
- Oracle使用存储过程返回查询游标
- Nodejs入门级基础+实战
- celery使用的小记录
- C# 进制转换(二进制、十六进制、十进制互转) 转载 https://www.cnblogs.com/icebutterfly/p/8884023.html
- VMware下Ubuntu全屏显示
- Ubuntu更换阿里云数据源