This commit is contained in:
oppofind 2021-02-03 00:02:26 +08:00
parent ee628235e7
commit 96c29e737b
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- 更新日期: 2020-02-x
- 更新内容:
1. 修复文件上传的参数丢失的注释。
2. 修复2.0.7新增忽略接口方法后解析父类字段缺失注释bug
#### 版本号2.0.7
- 更新日期: 2020-01-30
- 更新内容:

View File

@ -111,6 +111,9 @@ public class JavaClassUtil {
List<JavaMethod> javaMethods = cls1.getMethods();
for (JavaMethod method : javaMethods) {
String methodName = method.getName();
if (method.getAnnotations().size() < 1) {
continue;
}
int paramSize = method.getParameters().size();
if (methodName.startsWith("get") && !"get".equals(methodName) && paramSize == 0) {
methodName = StringUtil.firstToLowerCase(methodName.substring(3));
@ -119,6 +122,9 @@ public class JavaClassUtil {
}
if (addedFields.containsKey(methodName)) {
String comment = method.getComment();
if (Objects.isNull(comment)) {
comment = addedFields.get(methodName).getComment();
}
DocJavaField docJavaField = addedFields.get(methodName);
docJavaField.setAnnotations(method.getAnnotations());
docJavaField.setComment(comment);