コード例 #1
0
 @Override
 @Transactional
 public void afterPropertiesSet() throws Exception {
   if (repository.count() > 0) {
     return;
   }
   saveNew(defaultUser.getEmail(), true);
   User u = findByEmail(defaultUser.getEmail());
   changePassword(u.getId(), defaultUser.getPassword());
 }
コード例 #2
0
  private void sendPasswordToUser(long userId, String password) {
    User user = repository.findOne(userId);

    String mailTitle = "Photo Ordering Tool - Password";
    String mailBody = mailService.generateBody(user, password);

    mailService.send(user.getEmail(), mailTitle, mailBody);
  }