Programmatic transaction management

Report a typo

Which methods of the following class will initiate a database transaction?

@Transactional
public class AccountService {
    private final AccountRepo accountRepo;

    public AccountService(AccountRepo accountRepo) {
        this.accountRepo = accountRepo;
    }

    public void saveAccount(Account account) {
        accountRepo.save(account);
    }

    private Optional<Account> findAccount(Long id) {
        return accountRepo.findById(id);
    }
}
Select one option from the list
___

Create a free account to access the full topic