com.spring.aop.aspectj 下不成功
时间: 2023-11-25 08:04:58 浏览: 139
引用\[1\]中提到的错误是关于Spring AOP的切点配置路径有误导致的。解决方法是将原配置中的`execution(* com.kang.service.(…))`修改为`execution( com.kang.service.ServiceImpl.(…))`。这样可以正确匹配到切点。\[1\]
引用\[2\]中提到的解决方法是导入了`org.aspectj.aspectjweaver`的依赖,版本为`1.8.14`。这个依赖可能是解决问题的关键。\[2\]
引用\[3\]中提到的错误可能是由于Spring AOP代理混用导致的。解决方法是在XML配置文件中添加`<aop:aspectj-autoproxy proxy-target-class="true"/>`来解决这个问题。\[3\]
综上所述,如果在`com.spring.aop.aspectj`下不成功,可能是由于切点配置路径有误、缺少依赖或者代理混用等原因导致的。你可以根据上述提到的解决方法来尝试解决这个问题。
#### 引用[.reference_title]
- *1* [Error creating bean with name ‘org.springframework.aop.aspectj.AspectJPointcutAdvisor#0](https://blog.csdn.net/quest101/article/details/117877362)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [spring AOP 错误 org.springframework.aop.aspectj.AspectJPointcutAdvisor 等等](https://blog.csdn.net/weixin_30278237/article/details/97573038)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Failed to instantiate [org.springframework.aop.aspectj.AspectJExpressionPointcut]: No default constr](https://blog.csdn.net/thetimelyrain/article/details/96509488)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文