示例#1
0
  @Transactional
  public void update(Author author) {
    author = this.findById(author.getId());

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

    authorRepository.saveAndFlush(author);
  }
示例#2
0
 @Transactional
 public void updatePassword(Author author) {
   author.setPassword(passwordEncoder.encode(author.getPassword()));
   authorRepository.saveAndFlush(author);
 }