Configure a bean with map property

阅读更多

1、Using XML

  
    
      
        
          
        
        
          
        
      
    
  

 2、Using the Spring DSL

beans = {
   def dsMap = new HashMap()
   dsMap.put('a',  ref('dataSourceA') )
   dsMap.put('b',  ref('dataSourceB') )

   sqlService(SqlService) {
       dataSourceMap = dsMap
  }
  ...
}
 

你可能感兴趣的:(Bean,Spring,XML)