Guest User

Untitled

a guest
May 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. @Repository
  2. public interface UserRepository extends CrudRepository<User, Long> {
  3. User findOneByUsername(String username);
  4. List<User> findAll();
  5. }
  6.  
  7. @GetMapping("/admin/allUsers")
  8. public String getAllUsers(Model model) {
  9. model.addAttribute("users",this.userRepository.findAll());
  10. return "admin/allUsers";
  11. }
Add Comment
Please, Sign In to add comment