예제 #1
0
 @Transactional(readOnly = true)
 public User getUserWithAuthorities(Long id) {
   User user = userRepository.findOne(id);
   user.getAuthorities().size(); // eagerly load the association
   return user;
 }
예제 #2
0
 @Transactional(readOnly = true)
 public User getUserWithAuthorities() {
   User user = userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).get();
   user.getAuthorities().size(); // eagerly load the association
   return user;
 }
 public User getUserWithAuthorities(String id) {
   User user = userRepository.findOne(id);
   user.getAuthorities().size(); // eagerly load the association
   return user;
 }