Created
June 17, 2012 10:16
-
-
Save matsev/2944122 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @Controller | |
| @RequestMapping("/user") | |
| class UserController { | |
| private final UserService userService; | |
| @Autowired | |
| UserController(UserService userService) { | |
| this.userService = userService; | |
| } | |
| // Add CRUD methods | |
| } |
This file contains hidden or 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
| public interface UserService { | |
| long create(User user); | |
| User read(long userId) throws UnknownUserException; | |
| void update(long userId, User user) throws UnknownUserException; | |
| void delete(long userId) throws UnknownUserException; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment