code: private void registerDataSources(Map<String, Properties> mapCustom) {  
      	
          DefaultListableBeanFactory acf = (DefaultListableBeanFactory) this.context.getAutowireCapableBeanFactory();  
          Iterator<String> iter = mapCustom.keySet().iterator();  
          
         Map<Object, DataSource> targetDataSources = new HashMap<>();
         
         BeanDefinitionBuilder beanDefinitionBuilder = null;
  		while (iter.hasNext()) {
  			String dsKey = iter.next(); //
  			Properties nodeProps = mapCustom.get(dsKey);
  			// 如果当前库为最新一组数据库，注册beanName为master
  			logger.info(">>>>>begin to initialize datasource：" + dsKey + "\n================\n" + nodeProps.toString()
  					+ "\n==============");
  			if (DataSourceType.Druid == dataSourceType) {
  				beanDefinitionBuilder = DruidDataSourceBuilder.builder(nodeProps);
  			} else if (DataSourceType.HikariCP == dataSourceType) {
  				beanDefinitionBuilder = HikariCPDataSourceBuilder.builder(nodeProps);
  			}
  
  			acf.registerBeanDefinition(dsKey, beanDefinitionBuilder.getRawBeanDefinition());
  
  			DataSource ds = (DataSource) this.context.getBean(dsKey);
  			targetDataSources.put(dsKey, ds);
  			//  设置默认数据源
  			if (dsKey.equals(MASTER_KEY)) {
  				defaultDataSource = ds;
  			}
  			logger.info("bean[" + dsKey + "] has initialized! lookupKey:" + dsKey);
  			//
  			DataSourceContextHolder.get().registerDataSourceKey(dsKey);
  		} 
          
          addTargetDataSources(targetDataSources);
      }
docs: 功能说明：根据DataSource创建bean并注册到容器中
  @param mapCustom
  @param isLatestGroup