Feat:启用jwt配置化

This commit is contained in:
wangyu 2021-01-10 15:50:16 +08:00
parent e440659571
commit 7a2f8ca0ad

View File

@ -60,7 +60,7 @@ public class BeanProperty {
*/
public static BeanProperty form(PropertyDescriptor descriptor, Class<?> beanClass) {
// 尝试获取field
Field field = FieldUtils.getDeclaredField(beanClass, descriptor.getName(), true);
Field field = FieldUtils.getField(beanClass, descriptor.getName(), true);
// 存在field可以干一些坏事
BeanProperty property = new BeanProperty();
property.setName(descriptor.getName());
@ -82,10 +82,12 @@ public class BeanProperty {
} else if (property.getType() == BeanPropertyType.DB_REF) {
// 当存在db-ref时解析为动态数据源
RestBean restBean = clazz.getAnnotation(RestBean.class);
String uri = restBean.value();
Map<String, Object> props = new HashMap<>();
props.put("uri", uri);
property.setProps(props);
if (null != restBean) {
String uri = restBean.value();
Map<String, Object> props = new HashMap<>();
props.put("uri", uri);
property.setProps(props);
}
}
return property;
}