1、在使用切面注解@Aspect一直导入不了该包,网上很多说只要引入一下依赖就可以了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<scope>test</scope>
</dependency>
但是其实还要引入另外一个依赖才能使用@Aspect
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
或者把<scope>runtime</scope>去除。
————————————————
原文链接:https://blog.csdn.net/hyly_zhard/article/details/95628649