RESTful 优点:轻量级,安全,效率高

 

Controller.java

@RequestMapping("/restful/{userid}/{itemid}")
  //上面的参数和下面方法的对应对应
public String restful(@PathVariable("userid")int userid,@PathVariable("itemid")int itemid,ModelMap mm){ mm.addAttribute("userid", userid); mm.addAttribute("itemid", itemid); return "/restful.jsp"; }

浏览器访问

http://localhost:8089//SpringMVC_E004_EncodandRESTful/restful/1/4.do

显示

1,4

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
猜你喜欢
  • 2021-10-19
  • 2021-07-10
  • 2022-12-23
  • 2021-06-10
  • 2021-10-24
  • 2021-08-13
  • 2022-12-23
相关资源
相似解决方案