Spring Data findOne->findById

This commit is contained in:
Rob Winch 2017-05-04 09:38:03 -05:00
parent a199819acb
commit 021ee0d317
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public class MessageJsonController {
@RequestMapping("{id}")
public ResponseEntity<Optional<Message>> view(@PathVariable Long id) {
Optional<Message> message = messageRepository.findOne(id);
Optional<Message> message = messageRepository.findById(id);
return new ResponseEntity<>(message, HttpStatus.OK);
}