mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 优化多数据源aop顺序问题
This commit is contained in:
@ -20,7 +20,7 @@ import java.util.Objects;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Aspect
|
||||
@Order(1)
|
||||
@Order(-500)
|
||||
@Component
|
||||
public class DataSourceAspect {
|
||||
|
||||
@ -34,7 +34,9 @@ public class DataSourceAspect {
|
||||
DataSource dataSource = getDataSource(point);
|
||||
|
||||
if (Validator.isNotNull(dataSource)) {
|
||||
DynamicDataSourceContextHolder.push(dataSource.value().name());
|
||||
DynamicDataSourceContextHolder.poll();
|
||||
String source = dataSource.value().getSource();
|
||||
DynamicDataSourceContextHolder.push(source);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user