> For the complete documentation index, see [llms.txt](https://bohans.gitbook.io/ji-chu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohans.gitbook.io/ji-chu/spring/basic/core/mian-xiang-qie-mian-bian-cheng-aop/shi-yong-zhu-jie-chuang-jian-qie-mian/tong-guo-zhu-jie-yin-ru-xin-gong-neng.md).

# 通过注解引入新功能

<mark style="color:blue;">**使用 Spring AOP，可以为 bean 引入新的方法。代理拦截对新方法的调用，并将调用委托给实现该方法的其他对象**</mark>，原理如下图所示：

<figure><img src="https://3484936666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkc3qks6b4rvNPb2C0khl%2Fuploads%2FSQhmuVLTNddEhnsitHcJ%2Fimage.png?alt=media&amp;token=18e0218e-3e98-46ed-a227-f4440e83c306" alt="" width="563"><figcaption></figcaption></figure>

需要注意的是，**当引入接口的方法被调用时，代理会把此调用委托给实现了新接口的某个其他对象**。实际上，一个 bean 的实现被拆分到了多个类中。
