This commit is contained in:
Redkale
2017-05-25 16:01:11 +08:00
parent 74f554fe33
commit 3504d735c1
2 changed files with 1 additions and 4 deletions

View File

@@ -130,9 +130,6 @@ public final class Rest {
if (field.getAnnotation(Resource.class) == null) continue;
if (Modifier.isStatic(webSocketType.getModifiers())) throw new RuntimeException(field + " cannot static on createRestWebSocketServlet");
if (Modifier.isFinal(webSocketType.getModifiers())) throw new RuntimeException(field + " cannot final on createRestWebSocketServlet");
if (!Modifier.isPublic(webSocketType.getModifiers()) && !Modifier.isProtected(webSocketType.getModifiers())) {
throw new RuntimeException(field + " must be public or protected on createRestWebSocketServlet");
}
resourcesFieldSet.add(field);
}
} while ((clzz = clzz.getSuperclass()) != Object.class);

View File

@@ -11,7 +11,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* 只能依附在WebSocket类上name默认为Service的类名小写并去掉Service字样及后面的字符串 (如HelloWebSocket/HelloWebSocketImpl的默认路径为 hello)。 <br>
* <b>注意: </b> 被标记&#64;RestWebSocket的WebSocket不能被修饰为abstract或final其内部标记为&#64;Resource的字段只能是protected或public必须要有一个protected或public的空参数构造函数。 <br>
* <b>注意: </b> 被标记&#64;RestWebSocket的WebSocket不能被修饰为abstract或final且必须要有一个protected或public的空参数构造函数。 <br>
* <p>
* 详情见: https://redkale.org
*