feat: 增加db引用注解

This commit is contained in:
wangyu 2021-03-30 22:37:13 +08:00
parent 452c52140e
commit b5b8611b6c
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ public class BeanProperty {
DBRefValue dbRefValue = field.getAnnotation(DBRefValue.class); DBRefValue dbRefValue = field.getAnnotation(DBRefValue.class);
Document document = AnnotationUtils.findAnnotation(dbRefValue.value(), Document.class); Document document = AnnotationUtils.findAnnotation(dbRefValue.value(), Document.class);
if (null != document) { if (null != document) {
property.prop("uri", document.value()); property.prop("uri", document.collection());
} else { } else {
property.setType(BeanPropertyType.STRING); property.setType(BeanPropertyType.STRING);
} }
@ -133,7 +133,7 @@ public class BeanProperty {
// 当存在db-ref时解析为动态数据源 // 当存在db-ref时解析为动态数据源
Document document = AnnotationUtils.findAnnotation(clazz, Document.class); Document document = AnnotationUtils.findAnnotation(clazz, Document.class);
if (null != document) { if (null != document) {
property.prop("uri", document.value()); property.prop("uri", document.collection());
} else { } else {
property.setType(BeanPropertyType.STRING); property.setType(BeanPropertyType.STRING);
} }