Feat:启用jwt配置化
This commit is contained in:
parent
e440659571
commit
7a2f8ca0ad
@ -60,7 +60,7 @@ public class BeanProperty {
|
|||||||
*/
|
*/
|
||||||
public static BeanProperty form(PropertyDescriptor descriptor, Class<?> beanClass) {
|
public static BeanProperty form(PropertyDescriptor descriptor, Class<?> beanClass) {
|
||||||
// 尝试获取field
|
// 尝试获取field
|
||||||
Field field = FieldUtils.getDeclaredField(beanClass, descriptor.getName(), true);
|
Field field = FieldUtils.getField(beanClass, descriptor.getName(), true);
|
||||||
// 存在field,可以干一些坏事
|
// 存在field,可以干一些坏事
|
||||||
BeanProperty property = new BeanProperty();
|
BeanProperty property = new BeanProperty();
|
||||||
property.setName(descriptor.getName());
|
property.setName(descriptor.getName());
|
||||||
@ -82,11 +82,13 @@ public class BeanProperty {
|
|||||||
} else if (property.getType() == BeanPropertyType.DB_REF) {
|
} else if (property.getType() == BeanPropertyType.DB_REF) {
|
||||||
// 当存在db-ref时,解析为动态数据源
|
// 当存在db-ref时,解析为动态数据源
|
||||||
RestBean restBean = clazz.getAnnotation(RestBean.class);
|
RestBean restBean = clazz.getAnnotation(RestBean.class);
|
||||||
|
if (null != restBean) {
|
||||||
String uri = restBean.value();
|
String uri = restBean.value();
|
||||||
Map<String, Object> props = new HashMap<>();
|
Map<String, Object> props = new HashMap<>();
|
||||||
props.put("uri", uri);
|
props.put("uri", uri);
|
||||||
property.setProps(props);
|
property.setProps(props);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user