fix error
This commit is contained in:
parent
7417f01f49
commit
252b6c7436
|
@ -448,9 +448,11 @@ public class SourceBuilder {
|
|||
// Registry class
|
||||
registryClasses.put(className, className);
|
||||
String simpleName = DocClassUtil.getSimpleName(className);
|
||||
System.out.println("simpleName:"+simpleName);
|
||||
String[] globGicName = DocClassUtil.getSimpleGicName(className);
|
||||
JavaClass cls = this.getJavaClass(simpleName);
|
||||
List<JavaField> fields = this.getFields(cls, 0);
|
||||
System.out.println("字段李彪长度:"+fields.size());
|
||||
int n = 0;
|
||||
if (DocClassUtil.isPrimitive(simpleName)) {
|
||||
paramList.addAll(primitiveReturnRespComment(DocClassUtil.processTypeNameForParams(simpleName)));
|
||||
|
@ -1205,7 +1207,7 @@ public class SourceBuilder {
|
|||
if (null != annotationRequired) {
|
||||
required = annotationRequired.toString();
|
||||
}
|
||||
String annotationName = annotation.getType().getName();
|
||||
String annotationName = DocClassUtil.getAnnotationSimpleName(annotation.getType().getCanonicalName());
|
||||
if (REQUEST_BODY.equals(annotationName) || (VALID.equals(annotationName) && annotations.size() == 1)) {
|
||||
if (requestBodyCounter > 0) {
|
||||
throw new RuntimeException("You have use @RequestBody Passing multiple variables for method "
|
||||
|
|
|
@ -445,6 +445,7 @@ public class DocClassUtil {
|
|||
* @return ApiReturn
|
||||
*/
|
||||
public static ApiReturn processReturnType(String fullyName) {
|
||||
System.out.println("返回类的类名:"+fullyName);
|
||||
ApiReturn apiReturn = new ApiReturn();
|
||||
|
||||
//support web flux
|
||||
|
@ -488,4 +489,27 @@ public class DocClassUtil {
|
|||
}
|
||||
return apiReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get annotation simpleName
|
||||
*
|
||||
* @param annotationName annotationName
|
||||
* @return String
|
||||
*/
|
||||
public static String getAnnotationSimpleName(String annotationName) {
|
||||
return getClassSimpleName(annotationName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @param className className
|
||||
* @return String
|
||||
*/
|
||||
public static String getClassSimpleName(String className) {
|
||||
if (className.contains(".")) {
|
||||
int index = className.lastIndexOf(".");
|
||||
className = className.substring(index + 1, className.length());
|
||||
}
|
||||
return className;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue