!79 修正DynamicDataSourceContextHolder类中三处DataSource拼写错误

Merge pull request !79 from dhx920/master
pull/79/MERGE
dhx920 6 years ago committed by 若依
commit fc51f0ce80

@ -21,7 +21,7 @@ public class DynamicDataSourceContextHolder
/**
*
*/
public static void setDateSoureType(String dsType)
public static void setDataSourceType(String dsType)
{
log.info("切换到{}数据源", dsType);
CONTEXT_HOLDER.set(dsType);
@ -30,7 +30,7 @@ public class DynamicDataSourceContextHolder
/**
*
*/
public static String getDateSoureType()
public static String getDataSourceType()
{
return CONTEXT_HOLDER.get();
}
@ -38,7 +38,7 @@ public class DynamicDataSourceContextHolder
/**
*
*/
public static void clearDateSoureType()
public static void clearDataSourceType()
{
CONTEXT_HOLDER.remove();
}

@ -43,7 +43,7 @@ public class DataSourceAspect
if (StringUtils.isNotNull(dataSource))
{
DynamicDataSourceContextHolder.setDateSoureType(dataSource.value().name());
DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name());
}
try
@ -53,7 +53,7 @@ public class DataSourceAspect
finally
{
// 销毁数据源 在执行方法之后
DynamicDataSourceContextHolder.clearDateSoureType();
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
}

@ -22,6 +22,6 @@ public class DynamicDataSource extends AbstractRoutingDataSource
@Override
protected Object determineCurrentLookupKey()
{
return DynamicDataSourceContextHolder.getDateSoureType();
return DynamicDataSourceContextHolder.getDataSourceType();
}
}
Loading…
Cancel
Save