This commit is contained in:
Redkale
2016-09-08 09:21:28 +08:00
parent f16beca680
commit 21cfbebe26
3 changed files with 3 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ public class RestDocs extends HttpBaseServlet {
final Map<String, Object> parammap = new LinkedHashMap<>();
final boolean isarray = param.type().isArray();
final Class ptype = isarray ? param.type().getComponentType() : param.type();
parammap.put("name", param.value());
parammap.put("name", param.name());
parammap.put("radix", param.radix());
parammap.put("type", ptype.getName() + (isarray ? "[]" : ""));
parammap.put("src", param.src());

View File

@@ -79,7 +79,7 @@ public abstract class HttpBaseServlet extends HttpServlet {
@Documented
protected @interface WebParam {
String value(); //参数名
String name(); //参数名
Class type(); //参数的数据类型

View File

@@ -327,7 +327,7 @@ public final class Rest {
final boolean iscookie = ((RestCookie) ps[9]) != null; //是否取getCookie
AnnotationVisitor av2 = av3.visitAnnotation(null, webparamDesc);
av2.visit("value", (String) ps[1]);
av2.visit("name", (String) ps[1]);
av2.visit("type", Type.getType(Type.getDescriptor((Class) ps[2])));
av2.visit("radix", (Integer) ps[3]);
av2.visitEnum("src", sourcetypeDesc, ishead ? HttpBaseServlet.ParamSourceType.HEADER.name()