- 博客(2)
- 收藏
- 关注
原创 AOP简单实例
1、自定义注解 @Target(value = {ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface MyAnnotation { } 2、切面类 @Aspect @Component public class MyAnnotationAspect { /** * 定义切点,拦截的位置,可避免下面重复声明变量
2022-01-02 20:35:13
2918
1
原创 Aspect注解依赖引入(记录)
<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-s.
2021-12-30 11:02:27
2202
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人