Spring AOP 循环应用(This means that said other beans do not use the final version of the bean..)

本文详细解析了在使用Spring AOP进行面向切面编程时遇到的一个常见错误:`This means that said other beans do not use the final version of the bean`。主要从切入点和服务注入的角度出发,提出了排查和解决此错误的方法,包括检查服务是否被重复注入到AOP实现中以及确保服务正确调用DAO层代码。此外,文章还提供了几个优化建议来提升AOP配置的效率和稳定性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在做spring AOP时,总发现

This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.错误

解决:

 检查切入点service是否再次注入到了你的AOP实现中.

切入点service是否调用了dao层代码,调用了就不会错出了,否则会出上面你的错误

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值