From 78ac88b57cc8157c1a6a38dbd5291654037e36af Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Wed, 31 Aug 2016 09:20:49 +0800 Subject: [PATCH] --- src/org/redkale/net/http/Rest.java | 8 ++++---- src/org/redkale/net/http/RestMapping.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/redkale/net/http/Rest.java b/src/org/redkale/net/http/Rest.java index c019d6615..553f03d9a 100644 --- a/src/org/redkale/net/http/Rest.java +++ b/src/org/redkale/net/http/Rest.java @@ -180,7 +180,7 @@ public final class Rest { mv = new AsmMethodVisitor(cw.visitMethod(ACC_PUBLIC, entry.name, "(" + httpRequestDesc + httpResponseDesc + ")V", null, new String[]{"java/io/IOException"})); //mv.setDebug(true); mv.debugLine(); - if (entry.authignore) { //设置 AuthIgnore + if (!entry.auth) { //设置 AuthIgnore av0 = mv.visitAnnotation(authDesc, true); av0.visitEnd(); } @@ -442,7 +442,7 @@ public final class Rest { Set fields = new HashSet<>(); Map attrParaNames = new LinkedHashMap<>(); do { - if(loop == null || loop.isInterface()) break; //接口时getSuperclass可能会得到null + if (loop == null || loop.isInterface()) break; //接口时getSuperclass可能会得到null for (Field field : loop.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers())) continue; if (Modifier.isFinal(field.getModifiers())) continue; @@ -835,7 +835,7 @@ public final class Rest { this.name = n; this.mappingMethod = method; this.methods = mapping.methods(); - this.authignore = mapping.authignore(); + this.auth = mapping.auth(); this.actionid = mapping.actionid(); this.contentType = mapping.contentType(); this.jsvar = mapping.jsvar(); @@ -849,7 +849,7 @@ public final class Rest { public final String[] methods; - public final boolean authignore; + public final boolean auth; public final int actionid; diff --git a/src/org/redkale/net/http/RestMapping.java b/src/org/redkale/net/http/RestMapping.java index af41bd897..6c4b792ec 100644 --- a/src/org/redkale/net/http/RestMapping.java +++ b/src/org/redkale/net/http/RestMapping.java @@ -35,7 +35,7 @@ public @interface RestMapping { */ String name() default ""; - boolean authignore() default true; //是否跳过鉴权,默认跳过 + boolean auth() default false; //是否鉴权,默认不鉴权 int actionid() default 0; //操作ID值,鉴权时用到, 对应@WebAction.actionid