在Spring中用到cglib来enhance 类代码,猜测 Bean的Get Set函数可能作过特殊处理,在Spring的源码中有好几个地方有这样的代码:函数
method.getName().startsWith("set") spa
method.getName().startsWith("get"))get
猜测是加强了这样的方法,源码
好比Spring中的AUTOWIRE_BY_NAME有多是经过名字一致,而后从BeanFactory或ApplicationContext中获取到名字同样的Bean,而后作属性设置。it
这个只是猜测,有时间了再回来翻代码验证下。io