Giter Club home page Giter Club logo

book-small-spring's Issues

invokeInitMethods中缺少二次初始化的判断

AbstractAutowireCapableBeanFactory类中的invokeInitMethods函数应该像适配器的destroy函数一样,提供同时实现接口DisposableBean和添加至xml配置文件destroy-method时的判断。

参考适配器DisposableBeanAdapter的源码,是否应该将invokeInitMethods中的if条件修改如下?
if (StrUtil.isNotEmpty(initMethodName) && !(bean instanceof InitializingBean && "afterPropertiesSet".equals(initMethodName)))

书P92的注释不正确,为了避免二次销毁 应改为 为了避免二次初始化,但源码看起来已经更正了。

勘误

40页 top的code里面get/set 应该只有get,属性都是final修饰的

bean属性重复赋值问题

com.vow.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator#postProcessPropertyValues的方法是不是应该返回null,com.vow.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#doCreateBean在执行到applyBeanPostProcessorsBeforeApplyingPropertyValues(beanName, bean, beanDefinition);的时候会将InstantiationAwareBeanPostProcessor实现类返回的属性重复add到BeanDefinition#propertyValues属性列表中(beanDefinition.getPropertyValues().addPropertyValue(propertyValue);),会重复赋值

勘误

P164代码贴图不对

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.