Spring3: Dependency Configuration In Detail(Part II)

阅读更多

 

Introduction:

    In this article, we focus on the configuration file beans.xml for IoC purpose.

    Focusing on initialize beans whose property are collection types.

    Including and elements corrosponding to List, Set, Map and Properties in JAVA.

 

1. Four common collection types

    1)



	
		
			
				123
				133
				132
			
		
		
			
				
					
				
				
					
				
				
					
				
				
					
				
			
		
	

    2)



	
		
			
				
				
				
				
			
		
		
			
				
				
				
			
		
	
	
		
		
	
	
		
		
	

    3)



	
		
			
				
				
			
		
		
			
				122
				123
				231
			
		
	
	
		
		
	
	
		
		
	

    4)

    Just like previous introduction. Not usually used.

 

2. Inner beans introduction




  
  
    
    
  

    Comments:

        1)  A  element inside the  or  elements defines a so-called inner beans.

        2) Inner beans are always anonymous and they are always scoped as prototypes.

你可能感兴趣的:(Spring,3.2.2,IoC,Beans.xml,Configuration,Collection)