Several important concepts in AOP

xiaoxiao2021-03-05  25

AspectAn aspect is the cross-cutting functionality you are implementing. It is the aspect, or area, of your application you are modularizing. The most common (albeit simple) example of an aspect is logging. Logging is something that is requiredthroughout an application. However, because applications tend to be brokendown into layers based on functionality, reusing a logging module through inheritancedoes not make sense. However, you can create a logging aspect and apply itthroughout your application using AOP.JoinpointA joinpoint is a point in the execution of the application where an aspect can beplugged in. This point could be a method being called, an exception beingthrown, or even a field being modified. These are the points where your aspect'scode can be inserted into the normal flow of your application to add new BEHAVIOR.

转载请注明原文地址:https://www.9cbs.com/read-38658.html

New Post(0)