mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 23:32:14 +00:00
Spring Data findOne->findById
This commit is contained in:
parent
a199819acb
commit
021ee0d317
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user