supported controller implements interface.
This commit is contained in:
parent
a2bd0a041b
commit
7b24b37c0a
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
## smart-doc版本
|
||||
#### 版本号:2.3.1
|
||||
- 更新日期: 2021-11-13
|
||||
|
@ -8,6 +6,7 @@
|
|||
2. 修复response自定义tag设置返回未格式化换行问题。
|
||||
3. 修复枚举类型字段指定mock不生效的问题。
|
||||
4. 新增对@SessionAttribute参数做忽略。
|
||||
5. 支持controller实现接口,并使用default方法。
|
||||
|
||||
#### 版本号:2.3.0
|
||||
- 更新日期: 2021-11-07
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>smart-doc</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>2.3.0</version>
|
||||
<version>2.3.1</version>
|
||||
|
||||
<name>smart-doc</name>
|
||||
<url>https://github.com/smart-doc-group/smart-doc.git</url>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.shalousun</groupId>
|
||||
<artifactId>common-util</artifactId>
|
||||
<version>2.0.9</version>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
|
|
|
@ -215,6 +215,16 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate<ApiDoc> {
|
|||
docJavaMethods.add(DocJavaMethod.builder().setJavaMethod(method).setActualTypesMap(actualTypesMap));
|
||||
}
|
||||
}
|
||||
List<JavaType> implClasses = cls.getImplements();
|
||||
for (JavaType type : implClasses) {
|
||||
JavaClass javaClass = (JavaClass) type;
|
||||
Map<String, JavaType> actualTypesMap = JavaClassUtil.getActualTypesMap(javaClass);
|
||||
for (JavaMethod method : javaClass.getMethods()) {
|
||||
if (method.isDefault()) {
|
||||
docJavaMethods.add(DocJavaMethod.builder().setJavaMethod(method).setActualTypesMap(actualTypesMap));
|
||||
}
|
||||
}
|
||||
}
|
||||
List<ApiMethodDoc> methodDocList = new ArrayList<>(methods.size());
|
||||
int methodOrder = 0;
|
||||
for (DocJavaMethod docJavaMethod : docJavaMethods) {
|
||||
|
|
Loading…
Reference in New Issue