fix gitee #I3RGQL .
This commit is contained in:
parent
40be476c48
commit
907bf1cbfb
|
@ -4,6 +4,7 @@
|
|||
- 更新内容:
|
||||
1. 修复推送接口到torna丢失部分mock值的问题。
|
||||
2. 修复在参数注释中配置类替换时将非类名解析成类名的bug 。
|
||||
3. 支持父类上加@RestController注解的子类能够被识别和扫描
|
||||
#### 版本号:2.1.7
|
||||
- 更新日期: 2020-05-12
|
||||
- 更新内容:
|
||||
|
|
|
@ -825,7 +825,10 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
}
|
||||
|
||||
private boolean checkController(JavaClass cls) {
|
||||
List<JavaAnnotation> classAnnotations = cls.getAnnotations();
|
||||
JavaClass superClass = cls.getSuperJavaClass();
|
||||
List<JavaAnnotation> classAnnotations = new ArrayList<>();
|
||||
classAnnotations.addAll(superClass.getAnnotations());
|
||||
classAnnotations.addAll(cls.getAnnotations());
|
||||
for (JavaAnnotation annotation : classAnnotations) {
|
||||
String name = annotation.getType().getValue();
|
||||
if (SpringMvcAnnotations.CONTROLLER.equals(name) || SpringMvcAnnotations.REST_CONTROLLER.equals(name)) {
|
||||
|
@ -912,7 +915,8 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
}
|
||||
|
||||
private List<JavaAnnotation> getAnnotations(JavaClass cls) {
|
||||
List<JavaAnnotation> annotationsList = cls.getAnnotations();
|
||||
List<JavaAnnotation> annotationsList = new ArrayList<>();
|
||||
annotationsList.addAll(cls.getAnnotations());
|
||||
boolean flag = annotationsList.stream().anyMatch(item -> {
|
||||
String annotationName = item.getType().getValue();
|
||||
if (DocAnnotationConstants.REQUEST_MAPPING.equals(annotationName) ||
|
||||
|
|
Loading…
Reference in New Issue