fix gitee #I1NLDI

This commit is contained in:
oppofind 2020-07-15 23:47:45 +08:00
parent 89aafab868
commit 1dd7c4edfa
1 changed files with 6 additions and 0 deletions

View File

@ -266,6 +266,11 @@ public class JavaClassUtil {
List<String> validates = DocValidatorAnnotationEnum.listValidatorAnnotations();
List<AnnotationValue> annotationValueList = getAnnotationValues(validates, javaAnnotation);
addGroupClass(annotationValueList, javaClassList);
String simpleAnnotationName = javaAnnotation.getType().getValue();
// add default group
if (javaClassList.size() == 0 && JavaClassValidateUtil.isJSR303Required(simpleAnnotationName)) {
javaClassList.add("javax.validation.groups.Default");
}
return javaClassList;
}
@ -305,6 +310,7 @@ public class JavaClassUtil {
/**
* Get Map of final field and value
*
* @param clazz Java class
* @return Map
* @throws IllegalAccessException IllegalAccessException