Created
January 19, 2016 11:57
-
-
Save shazin/703cd80efc1ed965e374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/user") | |
public class UserController { | |
@Autowired | |
private UserService userService; | |
@RequestMapping(method = RequestMethod.GET) | |
public Observable<List<User>> find() { | |
return userService.findAll().toList(); | |
} | |
@RequestMapping(value="/name/{name}", method = RequestMethod.GET) | |
public Observable<List<User>> findByName(@PathVariable String name) { | |
return userService.findByName(name).toList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment