Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring中BeanFactory和FactoryBean的区别 #1

Open
xuyisu opened this issue Apr 10, 2020 · 0 comments
Open

Spring中BeanFactory和FactoryBean的区别 #1

xuyisu opened this issue Apr 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@xuyisu
Copy link
Owner

xuyisu commented Apr 10, 2020

这是一个容易混淆的知识点,面试也会常问到

  • BeanFactory: 表示它是一个工厂类,用于管理Bean的一个工厂,在Spring中,所有的Bean都是由BeanFactory(也就是IOC容器)来进行管理的
  • FactoryBean: 这个Bean不是简单的Bean,而是一个能生产或者修饰对象生成的工厂Bean,Spring通过反射机制利用的class属性指定实现类实例化Bean
@xuyisu xuyisu added the enhancement New feature or request label Apr 10, 2020
@xuyisu xuyisu closed this as completed Apr 10, 2020
@xuyisu xuyisu reopened this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant