Bean
什么是bean
bean就是IoC容器托管的对象。
引用自官方文档
In addition to bean definitions that contain information on how to create a specific bean, the ApplicationContext implementations also permit the registration of existing objects that are created outside the container (by users). This is done by accessing the ApplicationContext’s BeanFactory through the getBeanFactory() method, which returns the BeanFactory DefaultListableBeanFactory implementation. DefaultListableBeanFactory supports this registration through the registerSingleton(..) and registerBeanDefinition(..) methods. However, typical applications work solely with beans defined through regular bean definition metadata.
注:除了IoC容器根据配置元数据创建的bean之外,还可以将容器外创建的对象注册到IoC容器中。
Bean的配置元数据拥有的属性
注:下面标红的两个属性是这篇博客要介绍的属性