Feat:启用jwt配置化

This commit is contained in:
wangyu 2021-01-10 15:50:16 +08:00
parent e440659571
commit 7a2f8ca0ad
1 changed files with 7 additions and 5 deletions

View File

@ -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;
} }
} }