コード例 #1
0
 /** {@inheritDoc} */
 @Override
 public UserDetails loadUserByUsername(String username) {
   User user = (User) userDao.getByUsername(username);
   if (user == null) {
     throw new UsernameNotFoundException("User not found: " + username);
   }
   return user;
 }
コード例 #2
0
 /** {@inheritDoc} */
 @Override
 public User getCurrentUser() {
   return (User) userDao.getByUsername(getCurrentUserUsername());
 }