restful常用路径总结。

1.唯一标识定位资源

url: /binder/1

 controller:

@GetMapping("/binder/{id}")

public void getBinderById(@PathVariable long id)

 

2.通过非唯一标识定位资源

url: users?roleCode=example

@GetMapping(value = "/users", params = "roleCode")
public List<UserTO> getUsersByRoleCode(@RequestParam String roleCode)

 

posted @ 2018-07-25 10:05  董永辉Bruno  阅读(1289)  评论(0)    收藏  举报