Table of contents
1. Introduction
- Constructor
- set method
- annotation
2. Constructor injection
2.1 Customized classes
2.2 Writing xml files
3. set method injection
3.1 Customized classes
3.2 Writing xml files
4. Annotation injection
4.1 @AutoWired
The IOC container only needs one bean object of this type to use automatic injection.
4.2 @AutoWired + @Qualifier (bean objects of the same type exist)
The IOC container has more than one bean object of the same type (with different names).
Which bean object is the name of @Qualifier?