For the latest stable version, please use Spring Framework 6.2.0!spring-doc.cn

Defining New Advice Types

Spring AOP is designed to be extensible. While the interception implementation strategy is presently used internally, it is possible to support arbitrary advice types in addition to the interception around advice, before, throws advice, and after returning advice.spring-doc.cn

The org.springframework.aop.framework.adapter package is an SPI package that lets support for new custom advice types be added without changing the core framework. The only constraint on a custom Advice type is that it must implement the org.aopalliance.aop.Advice marker interface.spring-doc.cn

See the org.springframework.aop.framework.adapter javadoc for further information.spring-doc.cn