In Spring AOP, a proxy stands between callers and a target object. Spring exposes the proxy in place of the target; the proxy applies aspect logic to an intercepted call, then delegates to the target method. This wrapping process is called weaving. section 6.1
The name also appears in a different role: a CommentNotificationProxy is an application component responsible for communicating outside the app, such as sending an email. Interfaces let CommentService depend on that responsibility without depending on its implementation. section 4.1.3
An intercepted method call
When a caller invokes an aspected method through Spring’s proxy, the proxy applies the aspect logic and then calls the target method. Without interception, the call goes directly to the method. section 6.1
Figure 6.4 When a method isn’t aspected, the call goes directly to that method. When we define an aspect for a method, the call goes through the proxy object. The proxy object applies the logic defined by the aspect and then delegates the call to the real method.

Compare the direct call with the proxy-mediated call that applies aspect logic before delegating. section 6.1





