类 DsConfigUtil
java.lang.Object
com.baomidou.dynamic.datasource.toolkit.DsConfigUtil
动态数据源配置相关工具类
- 从以下版本开始:
- 3.5.0
- 作者:
- TaoYu
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ObjectconvertValue(Method method, Object value) 将需要传入invoke方法的值转换成方法对应的类型getGetterMethods(Class<?> clazz) 通过clazz获取对应的setter方法static Map<String, PropertyDescriptor> getPropertyDescriptorMap(Class<?> clazz) getSetterMethods(Class<?> clazz) 通过clazz获取对应的setter方法static StringlineToUpper(String str) 横划线转驼峰合并配置
-
构造器详细资料
-
DsConfigUtil
public DsConfigUtil()
-
-
方法详细资料
-
lineToUpper
横划线转驼峰- 参数:
str- 原字符串- 返回:
- 转换后的字符串
-
mergeMap
合并配置- 参数:
c- 当前配置g- 全局配置- 返回:
- 合并配置
-
getPropertyDescriptorMap
-
getGetterMethods
通过clazz获取对应的setter方法- 参数:
clazz- 类- 返回:
- setter方法
-
getSetterMethods
通过clazz获取对应的setter方法- 参数:
clazz- 类- 返回:
- setter方法
-
convertValue
将需要传入invoke方法的值转换成方法对应的类型- 参数:
method- 方法value- 值- 返回:
- 对应值
-