@RequestMapping():请求名称定义,可带参数
- 不带参数传递:
@RequestMapping(“index”)
url=>http://localhost:8080/index - 带参数请求(Restful API):
@RequestMapping(“index/{id}/{password}”)
url=>http://localhost:8080/index
后台方法绑定参数:@PathVariable(name=“id”) int id - 带参数请求:@RequestMapping(“index”)
url=>http://localhost:8080/index?id=11&password=“1121”