This commit is contained in:
@@ -130,9 +130,6 @@ public final class Rest {
|
|||||||
if (field.getAnnotation(Resource.class) == null) continue;
|
if (field.getAnnotation(Resource.class) == null) continue;
|
||||||
if (Modifier.isStatic(webSocketType.getModifiers())) throw new RuntimeException(field + " cannot static on createRestWebSocketServlet");
|
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.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);
|
resourcesFieldSet.add(field);
|
||||||
}
|
}
|
||||||
} while ((clzz = clzz.getSuperclass()) != Object.class);
|
} while ((clzz = clzz.getSuperclass()) != Object.class);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 只能依附在WebSocket类上,name默认为Service的类名小写并去掉Service字样及后面的字符串 (如HelloWebSocket/HelloWebSocketImpl,的默认路径为 hello)。 <br>
|
* 只能依附在WebSocket类上,name默认为Service的类名小写并去掉Service字样及后面的字符串 (如HelloWebSocket/HelloWebSocketImpl,的默认路径为 hello)。 <br>
|
||||||
* <b>注意: </b> 被标记@RestWebSocket的WebSocket不能被修饰为abstract或final,且其内部标记为@Resource的字段只能是protected或public,且必须要有一个protected或public的空参数构造函数。 <br>
|
* <b>注意: </b> 被标记@RestWebSocket的WebSocket不能被修饰为abstract或final,且必须要有一个protected或public的空参数构造函数。 <br>
|
||||||
* <p>
|
* <p>
|
||||||
* 详情见: https://redkale.org
|
* 详情见: https://redkale.org
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user