@GetMapping("/user/{id}")
public User getUser(@PathVariable("id") Integer id) {
User user = new User();
user.setId(id);
Example<User> example = Example.of(user);
Optional<User> one = userRepository.findOne(example);
return one.get();
}
@GetMapping("/user/all")
public List<User> getAll() {
List<User> all = userRepository.findAll();
System.out.println(all);
return all;
}