> For the complete documentation index, see [llms.txt](https://doc.shiker.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.shiker.tech/spring-boot-can-kao-wen-dang/7.-he-xin-te-xing/7.6-mian-xiang-qie-mian-de-bian-cheng.md).

# 7.6 面向切面的编程

Spring Boot 为面向切面编程（AOP）提供自动配置。[您可以在Spring 框架参考文档](https://docs.spring.io/spring-framework/reference/6.1/core/aop-api.html)中了解有关 Spring 的 AOP 的更多信息。

默认情况下，Spring Boot 的自动配置将 Spring AOP 配置为使用 CGLib 代理。要改为使用 JDK 代理，请设置`configprop:spring.aop.proxy-target-class`为`false`.

如果 AspectJ 在类路径上，Spring Boot 的自动配置将自动启用 AspectJ 自动代理，这样就不需要`@EnableAspectJAutoProxy`了。

<br>
