Closed zj8487 closed 9 years ago
var Wheel = function() {
this.$id = "wheel";
this.$proxy = false;
}
Wheel.prototype.doWheel = function() {
}
module.exports = Wheel;
这个因为是基础的bean,wheel是不能被aspect切入的,所以要设置 proxy 为 false
aspect 只是切入了car,并没有切入wheel啊!
难道aspect会去检查每一个bean,不管是否需要切入?
对的,默认切入,wheel 切入 aspect 就循环了
难怪,那我只是对几个bean切入。其他的所有bean都他要加上this.$proxy = false; 我试试看
it works
重现过程: 1,使用官方的例子:
bearcat/examples/aop_annotation
在car.js 中删除dyInit 函数。使得该用例能work2,在Aspect中引用wheel
3,测试该例子报错: [2015-07-01 16:01:55.499] [ERROR] bearcat - [BeanFactory] circle reference beanName aspect is in creating
4,wheel没有任何对象引用,不存在循环引用。