动态设置数据源笔记

继承AbstractRoutingDataSource

	@Override
	protected Object determineCurrentLookupKey()
	{
		Long id = UseridContextHolder.getUserid();
		return selectDBService.selectDb(id);
	}


	setTargetDataSources(dataSourceMap);

你可能感兴趣的:(java)