From 30b1bb7ce174f17a6ea1d57d59c4f8386ca00e74 Mon Sep 17 00:00:00 2001 From: oppofind <836575280@qq.com> Date: Wed, 25 Mar 2020 18:57:43 +0800 Subject: [PATCH] Add Contributor --- README.md | 1 + README_CN.md | 1 + src/main/java/com/power/doc/helper/JsonBuildHelper.java | 2 +- .../java/com/power/doc/template/SpringBootDocBuildTemplate.java | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 645373b..8c90207 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Thanks to the following people who have submitted major pull requests: - [@zuonidelaowang](https://github.com/zuonidelaowang) - [@su-qiu](https://github.com/su-qiu) - [@qinkangdeid](https://github.com/qinkangdeid) +- [@br7roy](https://github.com/br7roy) ## Other reference - [Smart-doc manual](https://github.com/shalousun/smart-doc/wiki) diff --git a/README_CN.md b/README_CN.md index fc1e556..851721c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -162,6 +162,7 @@ mvn clean install -Dmaven.test.skip=true - [@zuonidelaowang](https://github.com/zuonidelaowang) - [@su-qiu](https://github.com/su-qiu) - [@qinkangdeid](https://github.com/qinkangdeid) +- [@br7roy](https://github.com/br7roy) ## Other reference - [smart-doc功能使用介绍](https://my.oschina.net/u/1760791/blog/2250962) - [smart-doc官方wiki](https://gitee.com/sunyurepository/smart-doc/wikis/Home?sort_id=1652800) diff --git a/src/main/java/com/power/doc/helper/JsonBuildHelper.java b/src/main/java/com/power/doc/helper/JsonBuildHelper.java index 16fedd0..0669707 100644 --- a/src/main/java/com/power/doc/helper/JsonBuildHelper.java +++ b/src/main/java/com/power/doc/helper/JsonBuildHelper.java @@ -171,7 +171,7 @@ public class JsonBuildHelper { } List annotations = field.getAnnotations(); for (JavaAnnotation annotation : annotations) { - String annotationName = annotation.getType().getSimpleName(); + String annotationName = annotation.getType().getName(); if (DocAnnotationConstants.SHORT_JSON_IGNORE.equals(annotationName) && isResp) { continue out; } else if (DocAnnotationConstants.SHORT_JSON_FIELD.equals(annotationName) && isResp) { diff --git a/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java b/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java index 69f28be..7a35c19 100644 --- a/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java +++ b/src/main/java/com/power/doc/template/SpringBootDocBuildTemplate.java @@ -226,7 +226,7 @@ public class SpringBootDocBuildTemplate implements IDocBuildTemplate { List annotations = parameter.getAnnotations(); boolean paramAdded = false; for (JavaAnnotation annotation : annotations) { - String annotationName = annotation.getType().getSimpleName(); + String annotationName = JavaClassUtil.getAnnotationSimpleName(annotation.getType().getName()); String fullName = annotation.getType().getSimpleName(); if (!springMvcRequestAnnotations.contains(fullName) || paramAdded) { continue;