📜  Spring AOP-核心概念

📅  最后修改于: 2020-11-11 05:15:34             🧑  作者: Mango


在开始使用AOP之前,让我们熟悉AOP的概念和术语。这些术语不是特定于Spring,而是与AOP相关。

Sr.No. Terms & Description
1

Aspect

A module which has a set of APIs providing cross-cutting requirements. For example, a logging module would be called AOP aspect for logging. An application can have any number of aspects depending on the requirement.

2

Join point

This represents a point in your application where you can plug-in AOP aspect. You can also say, it is the actual place in the application where an action will be taken using Spring AOP framework.

3

Advice

This is the actual action to be taken either before or after the method execution. This is the actual piece of code that is invoked during program execution by Spring AOP framework.

4

PointCut

This is a set of one or more joinpoints where an advice should be executed. You can specify PointCuts using expressions or patterns as we will see in our AOP examples.

5

Introduction

An introduction allows you to add new methods or attributes to existing classes.

6

Target object

The object being advised by one or more aspects. This object will always be a proxied object. Also referred to as the advised object.

7

Weaving

Weaving is the process of linking aspects with other application types or objects to create an advised object. This can be done at compile time, load time, or at runtime.