feat: 增加db引用注解

This commit is contained in:
wangyu 2021-03-30 22:37:13 +08:00
parent 452c52140e
commit b5b8611b6c

View File

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