BankService.java 417 B

12345678910111213141516
  1. package bigbank;
  2. import org.springframework.security.access.prepost.PreAuthorize;
  3. public interface BankService {
  4. public Account readAccount(Long id);
  5. public Account[] findAccounts();
  6. @PreAuthorize(
  7. "hasRole('ROLE_SUPERVISOR') or " +
  8. "hasRole('ROLE_TELLER') and (#account.balance + #amount >= -#account.overdraft)" )
  9. public Account post(Account account, double amount);
  10. }