测试注解AOP出现的错误:警告: Exception encountered during context initialization -cancelling refresh attempt

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountService’ defined in file [D:\IdeaProject\day03_eesy_04adviceType - 副本\target\classes\com\spring\service\Impl\AccountServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can’t find referenced pointcut pt1
Exception in thread “main” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountService’ defined in file [D:\IdeaProject\day03_eesy_04adviceType - 副本\target\classes\com\spring\service\Impl\AccountServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can’t find referenced pointcut pt1

从头到尾检查了一遍注解没有什么问题,最后在pom.xml发现了引入的jar包有问题

发生错误的jar包是这个
在这里插入图片描述
应该修改成
在这里插入图片描述
就可以啦

发布了23 篇原创文章 · 获赞 5 · 访问量 1136

猜你喜欢

转载自blog.csdn.net/qq_40181435/article/details/105344141