使用spring实现AOP
【注意】使用AOP织入,需要导入一个依赖包
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.6</version>
<scope>runtime</scope>
</dependency>
方式一:使用spring的API接口【主要是SpringAPI接口实现】
方法二:自定义来实现AOP【主要是切面定义】
方式三:使用注解实现

浙公网安备 33010602011771号