blob: 97384c3cecccb1cb7500cef05e6d41d66629ef76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package com.example.spring.aop.security;
public class AccessChecker {
public void checkDepositPermission() {
System.out.println("Aspect is checking deposit permission...");
}
public void checkWithdrawPermission(double amount) {
System.out.println("Aspect is checking withdraw permission for " + amount);
if (amount > 1000.0) {
throw new AccessException("Withdrawing more than 1000.0 is not allowed.");
}
}
}
|