示例#1
0
  @Override
  public UserDetails loadUserByUsername(String string) throws UsernameNotFoundException {
    logger.info("Loading user " + string);
    UserAccount user = userDao.getUser(string);

    if (user == null) {
      logger.warn("Failed to find user in database");
      throw new UsernameNotFoundException("User not found");
    }

    logger.info("Found user " + user.toString());
    return userAssembler.buildUserFromUserEntity(user);
  }
示例#2
0
 public void addUser(UserAccount user) throws TaskTrackerException {
   userDao.addUser(user);
 }