One, two ways to configure beans using the XML configuration Bean
Automatic assembly of 1.Bean
the ①.spring IOC container can automatically assemble beans. The only thing you need to do is to specify the automatic assembly mode in the <bean> autowire attribute.②.bytype (automatically assembled by type): If there are multiple beans in the IOC container that are consistent with the target bean type. In this case, Spring will not be able to determine which bean is most suitable for this property, so automatic assembly cannot be performed.③.byname (Auto-assemble by name): The name and property name of the target Bean must be set exactly the same.④.constructor (automatically assembled via the constructor): This automatic assembly method is complex when there are multiple constructors in the Bean. deprecated
Configuration of Bean for 5.Spring series 2