auto-proxy中的被代理类只实例化而没有填充属性?
KeenRunner opened this issue · comments
KeenRunner commented
DefaultAdvisorAutoProxyCreator类的postProcessBeforeInstantiation方法中,只是调用了instantiate方法来实例化bean,没有填充属性,不知道算不算一个bug?
DerekYRC commented
DefaultAdvisorAutoProxyCreator类的postProcessBeforeInstantiation方法中,只是调用了instantiate方法来实例化bean,没有填充属性,不知道算不算一个bug?
是bug。在populate-proxy-bean-with-property-values分支中修复了,将织入逻辑迁移到BeanPostProcessor#postProcessAfterInitialization,即将DefaultAdvisorAutoProxyCreator#postProcessBeforeInstantiation的内容迁移到DefaultAdvisorAutoProxyCreator#postProcessAfterInitialization中。
详情见“bug fix:没有为代理bean设置属性”小节