This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| back-end:spring [2022/06/19 15:42] – Pointcut 문단 수정 ledyx | back-end:spring [2024/10/14 00:35] (current) – [Lifecycle Callbacks] ledyx | ||
|---|---|---|---|
| Line 65: | Line 65: | ||
| </ | </ | ||
| - | * 메서드를 구현하고 @PostConstruct, | + | * 메서드를 구현하고 @PostConstruct, |
| Line 99: | Line 99: | ||
| client-- request --> | client-- request --> | ||
| ProxyFactory-- Proxy 대상 객체가 Interface를 구현 O --> | ProxyFactory-- Proxy 대상 객체가 Interface를 구현 O --> | ||
| - | ProxyFactory-- Proxy 대상 객체가 Interface를 구현 X --> | + | ProxyFactory-- Proxy 대상 객체가 Interface를 구현 X< |
| p1-- " | p1-- " | ||
| p2-- " | p2-- " | ||
| Line 163: | Line 163: | ||
| * execution : Method 실행 join points를 matching. Spring AOP로 작업할 때 가장 우선적인 PCD이다. | * execution : Method 실행 join points를 matching. Spring AOP로 작업할 때 가장 우선적인 PCD이다. | ||
| - | * Type Matching시 | + | * declaring-type-pattern에서 |
| - | * within : 특정 Type에 join points를 matching. | + | * param-pattern에서 부모 타입 불가능 |
| + | |||
| + | * within : 특정 Type에 join points | ||
| * 부모 타입 불가능. 정확히 맞아야 한다. | * 부모 타입 불가능. 정확히 맞아야 한다. | ||
| - | | + | * target : target 객체(Spring AOP Porxy가 적용되는 |
| - | | + | * 부모 타입 가능. |
| + | * this : Spring 빈 객체(Spring AOP __Proxy__)를 대상 | ||
| + | * 부모 타입 가능. | ||
| * args : 인자가 주어진 타입의 인스턴스 한정 | * args : 인자가 주어진 타입의 인스턴스 한정 | ||
| - | | + | * 부모 타입 가능 |
| - | * @args : 전달된 실제 arguments의 Runtime type이 주어진 Type의 Annotation이 있는 Join points | + | |
| - | * @annotation : Method가 주어진 Annotation을 갖고 있는 Join points에 matching. | + | |
| + | | ||
| + | * @within : Annotation이 있는 | ||
| + | |||
| + | * @args : 전달된 실제 arguments의 Runtime type이 주어진 Type의 Annotation이 있는 Join points | ||
| + | * 부모 타입 허용 | ||
| + | * @annotation : Method가 주어진 Annotation을 갖고 있는 Join points | ||
| + | <note important> | ||
| + | **args, @args, @target**는 단독으로 사용하면 안된다! | ||
| + | 이 PCD들은 인스턴스가 만들어진 후 Runtime 시점에서 동작한다. | ||
| + | 그러므로 단독으로 사용하면 모든 스프링 빈에 AOP를 적용하려고 시도한다. | ||
| + | 이 때, 스프링 내부에서 사용하는 빈 중에 ' | ||
| + | </ | ||
| ===== execution ===== | ===== execution ===== | ||