@Component @Order(value=-2147483648) public class DynamicDataSourceAspect extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
DynamicDataSourceAspect() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
around(org.aspectj.lang.ProceedingJoinPoint point) |
void |
dataSourcePointCut() |
String |
getDbNameByDbName(Object[] args,
Method method)
从 @DbName 中获取数据源名[从参数中获取 数据源名]
|
String |
getDbNameByDyDS(Method method,
Class targetClass)
从 @DyDS 中获取数据源名[直接获取写死的数据源名]
|
public void dataSourcePointCut()
public Object around(org.aspectj.lang.ProceedingJoinPoint point) throws Throwable
Throwablepublic String getDbNameByDyDS(Method method, Class targetClass)
public String getDbNameByDbName(Object[] args, Method method) throws IllegalAccessException
IllegalAccessException - 数据源名获取异常Copyright © 2024 tan. All rights reserved.