1.什么是restFul
2.restFul的约定方式
- GET(查询) http://localhost/user/1
- POST(保存) http://localhsot/user
- PUT(更新) http://localhost/user
- DELETE(删除) http://localhsot/user/id
RestFul只是一种风格,并不是规范。
开发注意事项一:
@RestController
public class UserController {
@RequestMapping(value = "/user/{id}",method = RequestMethod.GET)
public String restGet(@PathVariable String id){
System.out.println("restful is running ....get:"+id);
return "success.jsp"; }
@RequestMapping(value = "/user/{id}",method = RequestMethod.POST)
public String restPost(@PathVariable String id){
System.out.println("restful is running ....post:"+id);
return &#