Commit 316b126c by dhx920

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

parent f7a9f338
...@@ -21,7 +21,7 @@ public class DynamicDataSourceContextHolder ...@@ -21,7 +21,7 @@ public class DynamicDataSourceContextHolder
/** /**
* 设置数据源的变量 * 设置数据源的变量
*/ */
public static void setDateSoureType(String dsType) public static void setDataSourceType(String dsType)
{ {
log.info("切换到{}数据源", dsType); log.info("切换到{}数据源", dsType);
CONTEXT_HOLDER.set(dsType); CONTEXT_HOLDER.set(dsType);
...@@ -30,7 +30,7 @@ public class DynamicDataSourceContextHolder ...@@ -30,7 +30,7 @@ public class DynamicDataSourceContextHolder
/** /**
* 获得数据源的变量 * 获得数据源的变量
*/ */
public static String getDateSoureType() public static String getDataSourceType()
{ {
return CONTEXT_HOLDER.get(); return CONTEXT_HOLDER.get();
} }
...@@ -38,7 +38,7 @@ public class DynamicDataSourceContextHolder ...@@ -38,7 +38,7 @@ public class DynamicDataSourceContextHolder
/** /**
* 清空数据源变量 * 清空数据源变量
*/ */
public static void clearDateSoureType() public static void clearDataSourceType()
{ {
CONTEXT_HOLDER.remove(); CONTEXT_HOLDER.remove();
} }
......
...@@ -43,7 +43,7 @@ public class DataSourceAspect ...@@ -43,7 +43,7 @@ public class DataSourceAspect
if (StringUtils.isNotNull(dataSource)) if (StringUtils.isNotNull(dataSource))
{ {
DynamicDataSourceContextHolder.setDateSoureType(dataSource.value().name()); DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name());
} }
try try
...@@ -53,7 +53,7 @@ public class DataSourceAspect ...@@ -53,7 +53,7 @@ public class DataSourceAspect
finally finally
{ {
// 销毁数据源 在执行方法之后 // 销毁数据源 在执行方法之后
DynamicDataSourceContextHolder.clearDateSoureType(); DynamicDataSourceContextHolder.clearDataSourceType();
} }
} }
} }
...@@ -22,6 +22,6 @@ public class DynamicDataSource extends AbstractRoutingDataSource ...@@ -22,6 +22,6 @@ public class DynamicDataSource extends AbstractRoutingDataSource
@Override @Override
protected Object determineCurrentLookupKey() protected Object determineCurrentLookupKey()
{ {
return DynamicDataSourceContextHolder.getDateSoureType(); return DynamicDataSourceContextHolder.getDataSourceType();
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment