记使用AOP+自定义注解完成接口的权限校验,代码如下:

pom文件添加所需依赖:

1 <dependency>
2     <groupId>org.aspectj</groupId>
3     <artifactId>aspectjrt</artifactId>
4     <version>1.8.9</version>
5 </dependency>
6 <dependency>
7     <groupId>org.springframework.boot</groupId>
8     <artifactId>spring-boot-starter-aop</artifactId>
9 </dependency>
09-15 05:11