经常使用的HTTP请求格式:java
普通的GET请求&Controller的定义:app
http://localhost:8080/controller/func?a=1&b=2spa
@RequestMapping(value = "func", method = RequestMethod.GET) public Object query(@RequestParam("a") String a,@RequestParam("b") String b)
RestFul的Get请求&Controller的定义code
http://localhost:8080/controller/func/a/bclass
@RequestMapping(value = "func/{a}/{b}", method = RequestMethod.GET) public Object query(@PathVariable String a,@PathVariable String b)
REST只是一种风格,不是一种标准请求
待续...ping