Declaring a point-cut

Just to recall, a join-point is a place where we want to apply Advice, and a point-cut represents a pattern of matching join-points. A point-cut must be defined within the <aop:config> element. A point-cut can be declared within the <aop:aspect> element or outside of it. If it's defined outside of <aop:aspect>, it can be shared between multiple aspects and advisors.

A point-cut allows Advice to be applied to the target object independently of the object-oriented hierarchy. Transaction management through AOP Advice in Spring is a real example of where transaction Advice is applied to specific methods (add/update/delete methods) that span multiple object hierarchies. This snippet is one of the possible ways of writing ...

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.