|
@@ -1,10 +1,10 @@
|
|
|
-package com.usoftchina.bi.aspect;
|
|
|
|
|
|
|
+package com.usoftchina.bi.server.aspect;
|
|
|
|
|
|
|
|
import com.usoftchina.bi.core.jdbc.DynamicDataSourceContextHolder;
|
|
import com.usoftchina.bi.core.jdbc.DynamicDataSourceContextHolder;
|
|
|
-import com.usoftchina.bi.dao.dataSource.DataColumnMapper;
|
|
|
|
|
|
|
+import com.usoftchina.bi.server.dao.dataSource.DataColumnMapper;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-import com.usoftchina.bi.model.bo.ToSql;
|
|
|
|
|
|
|
+import com.usoftchina.bi.server.model.bo.ToSql;
|
|
|
import org.aspectj.lang.JoinPoint;
|
|
import org.aspectj.lang.JoinPoint;
|
|
|
import org.aspectj.lang.annotation.After;
|
|
import org.aspectj.lang.annotation.After;
|
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
@@ -34,7 +34,7 @@ public class DynamicDattaSourceAspect {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(DynamicDattaSourceAspect.class);
|
|
private static final Logger logger = LoggerFactory.getLogger(DynamicDattaSourceAspect.class);
|
|
|
|
|
|
|
|
//改变数据源
|
|
//改变数据源
|
|
|
- @Before("@annotation(com.usoftchina.bi.model.pojo.annotation.TargetDataSource)")
|
|
|
|
|
|
|
+ @Before("@annotation(com.usoftchina.bi.server.model.pojo.annotation.TargetDataSource)")
|
|
|
public void changeDataSource(JoinPoint joinPoint) {
|
|
public void changeDataSource(JoinPoint joinPoint) {
|
|
|
Object[] arr = joinPoint.getArgs();
|
|
Object[] arr = joinPoint.getArgs();
|
|
|
String joinStr = null;
|
|
String joinStr = null;
|
|
@@ -60,7 +60,7 @@ public class DynamicDattaSourceAspect {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @After("@annotation(com.usoftchina.bi.model.pojo.annotation.TargetDataSource)")
|
|
|
|
|
|
|
+ @After("@annotation(com.usoftchina.bi.server.model.pojo.annotation.TargetDataSource)")
|
|
|
public void clearDataSource(JoinPoint joinPoint) {
|
|
public void clearDataSource(JoinPoint joinPoint) {
|
|
|
logger.info("清除数据源!");
|
|
logger.info("清除数据源!");
|
|
|
DynamicDataSourceContextHolder.clearDataSourceType();
|
|
DynamicDataSourceContextHolder.clearDataSourceType();
|