Ejemplo n.º 1
0
  @Transactional
  public void update(Author author) {
    author = this.findById(author.getId());

    author.setFirstName(author.getFirstName());
    author.setLastName(author.getLastName());

    authorRepository.saveAndFlush(author);
  }
Ejemplo n.º 2
0
 @Transactional
 public void updatePassword(Author author) {
   author.setPassword(passwordEncoder.encode(author.getPassword()));
   authorRepository.saveAndFlush(author);
 }