| | |
| | | package com.ruoyi.framework.aspectj; |
| | | |
| | | import java.util.Objects; |
| | | import cn.hutool.core.lang.Validator; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.framework.datasource.DynamicDataSourceContextHolder; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | |
| | | import org.springframework.core.annotation.AnnotationUtils; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.datasource.DynamicDataSourceContextHolder; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 多数据源处理 |
| | |
| | | { |
| | | DataSource dataSource = getDataSource(point); |
| | | |
| | | if (StringUtils.isNotNull(dataSource)) |
| | | if (Validator.isNotNull(dataSource)) |
| | | { |
| | | DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); |
| | | } |