@Transactional public void update(Author author) { author = this.findById(author.getId()); author.setFirstName(author.getFirstName()); author.setLastName(author.getLastName()); authorRepository.saveAndFlush(author); }
@Transactional public void updatePassword(Author author) { author.setPassword(passwordEncoder.encode(author.getPassword())); authorRepository.saveAndFlush(author); }