Bean configuration in Spring: <beans> the root element of the Spring configuration file, which contains one or more bean elements. Default-autowire attribute: the default automatic bean Assembly mode. Five modes are available. No: automatic assembly is not used. Bean references must be defined by the ref element. ByName: automatic assembly by attribute name. ByType: If BeanFactory has a bean of the same property type, this property will be automatically assembled. If there is more than one such bean, a fatal exception is thrown, which indicates that you may not be able to use byType automatic assembly for that bean. If no matching bean exists, nothing will happen and the attribute will not be set. If this is not what you want (nothing happens), set the dependency-check = "objects" attribute value to specify that an error should be thrown in this case. Constructor: similar to byType, it is only a Parameter Applied to the constructor. If not exactly one bean in BeanFactory is of the same type as the constructor parameter, a fatal error is generated. Autodetect: Select constructor or byType by checking the bean class. If a default constructor is found, byType is applied. Default-dependency-check attribute: default dependency check mode. Optional. None: no dependency check is performed. The bean attribute without a specified value only does not have a value. Simple: checks the dependencies of Basic Types and collections (except for collaborators, such as other beans and everything. Object: Check the dependencies of the collaborators. All: Check the dependencies of collaborators, basic types, and sets. Default-lazy-init property: default delay loading. True or False. <Bean> it is used to tell the Spring container a class and how it is configured. Class Attribute: Java Bean class name. Id attribute: the unique identifier of Java Bean in BeanFactory. This attribute must be used as the index name when obtaining a JavaBean instance through BeanFactory in the code. Name attribute: Same as above. If you add an alias to the bean, you can use the name attribute to specify one or more IDs. Singleton attribute: Specifies whether the Java Bean adopts Singleton mode. If it is set to "true", only one Java Bean instance is maintained within the scope of BeanFactory, the Code uses BeanFactory to obtain the reference of this Java Bean instance. Otherwise, if it is set to "false", when BeanFactory is used to obtain the Java Bean instance, BeanFactory will create a new instance every time and return it. Abstract attribute: sets whether ApplicationContext initializes beans in advance. Parent attribute: defines a template. Autowire attribute: Automatic bean Assembly mode. Five modes are available. No: automatic assembly is not used. Bean references must be defined by the ref element. ByName: automatic assembly by attribute name. ByType: If BeanFactory has a bean of the same property type, this property will be automatically assembled. If there is more than one such bean, a fatal exception is thrown, which indicates that you may not be able to use byType automatic assembly for that bean. If no matching bean exists, nothing will happen and the attribute will not be set. If this is not what you want (nothing happens), set the dependency-check = "objects" attribute value to specify that an error should be thrown in this case. Constructor: similar to byType, it is only a Parameter Applied to the constructor. If not exactly one bean in BeanFactory is of the same type as the constructor parameter, a fatal error is generated. Autodetect: Select constructor or byType by checking the bean class. If a default constructor is found, byType is applied. Dependency-check attribute: dependency check mode. Optional. None: no dependency check is performed. The bean attribute without a specified value only does not have a value. Simple: checks the dependencies of Basic Types and collections (except for collaborators, such as other beans and everything. Object: Check the dependencies of the collaborators. All: Check the dependencies of collaborators, basic types, and sets. Lazy-init attribute: delayed loading. True or False. Init-method property: initialization method. This method will be executed after BeanFactory creates a JavaBean instance and before returning a reference to the application layer. It is generally used for initialization of some resources. Destroy-method property: destroy method. This method will be executed when BeanFactory is destroyed and is generally used for resource release. Factory-bean properties: Create a bean using the instance factory method. The class attribute must be blank and the factory-bean attribute must specify the name of a bean, this bean must be in the current bean factory or parent bean Factory and contain factory methods. The factory method itself is set through the factory-method attribute. Factory-method property: Set the factory method of the factory class. Depends-on attribute: Bean dependency. Generally, this parameter is not required. Spring organizes the construction of various dependencies according to the situation. Only in some special cases, such as some static variables in JavaBean, need to be initialized (this is a BadSmell and should be avoided in design ). You can use depends-on to specify its dependency to ensure that the resources specified by depends-on are loaded before the Bean is loaded. <Property> used to set an attribute. Name property: the name of the property. Value Attribute: Specifies the bean property value. BeanFactory will automatically match according to the attribute type corresponding to Java Bean. If you want to set the attribute value to null, you must use the <null/> node. Ref attribute: Specifies the reference relationship between the attribute and other beans in BeanFactory. <Value> specifies the bean property value. <Ref> specifies the reference relationship between attributes and other beans in BeanFactory. Bean property: Specifies the reference relationship between the property and other beans in BeanFactory. Local attribute: Specifies the reference relationship between the attribute and other beans in BeanFactory. (Only search for beans in the local (Same) xml file. Parent property: Specifies the reference relationship between the property and other Bean templates in BeanFactory. <List> the attribute type of the specified bean is the attribute value of the List. <Map> the attribute type of the specified bean is the attribute value of List. <Set> the attribute type of the specified bean is the attribute value of List. <Props> the attribute type of the specified bean is the property value of Properties. <Prop> www.2cto.com key attribute: Specify the Properties key <idref> to set the attribute value to the id or name of other beans in the container. <Null> specify a null value. <Constructor-arg> Use constructor injection to specify constructor parameters. Index attribute: sets the parameter sequence number. Ref attribute: Same as reftype attribute: parameter type. Value Attribute: the value of a parameter. <Lookup-method> The lookup method injects bean attributes: attributes of the bean name to be injected: the name of the method to be injected <replaced-method> is used to replace existing method implementations with other implementations. Name attribute: replacer attribute of the method name to be replaced: the replacement class, which implements the org. springframework. beans. factory. support. MethodReplacer Interface) <arg-type> type returned by the method