- public class MyRestController {
- @RequestMapping(value="/{user}", method=RequestMethod.GET)
- public User getUser(@PathVariable Long user) {
- }
- @RequestMapping(value="/{user}/customers", method=RequestMethod.GET)
- List<Customer> getUserCustomers(@PathVariable Long user) {
- }
- @RequestMapping(value="/{user}", method=RequestMethod.DELETE)
- public User deleteUser(@PathVariable Long user) {
- }
- }
Raw Paste