[Spring Notes] Spring Configuration

Alias:

If an alias is added, the object can be obtained by the alias

 

Bean:

id: Unique identifier of the bean (object name)

class: the type corresponding to the bean object (package name + class name)

name: alias

 

 Create multiple aliases with delimiters

import: generally used for team development, you can import and merge multiple configuration files into one

Assuming that the project is developed by multiple people, and different classes are registered in different beans, you can use import to merge all the beans.xml into one general.

beans.xml

 

beans2.xml

 

 applicationConext.xml

 

Guess you like

Origin blog.csdn.net/m0_52043808/article/details/124382393