This commit is contained in:
@@ -149,8 +149,15 @@ public final class Rest {
|
||||
final String resourceGenericDescriptor = sb1.length() == sb2.length() ? null : sb2.toString();
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
final Map<String, List<String>> asmParamMap = MethodParamClassVisitor.getMethodParamNames(webSocketType);
|
||||
final Set<String> messageNames = new HashSet<>();
|
||||
for (Method method : webSocketType.getMethods()) {
|
||||
|
||||
RestOnMessage rom = method.getAnnotation(RestOnMessage.class);
|
||||
if (rom == null) continue;
|
||||
String name = rom.name();
|
||||
if (name.isEmpty()) throw new RuntimeException(method + " RestOnMessage.name is empty createRestWebSocketServlet");
|
||||
if (messageNames.contains(name)) throw new RuntimeException(method + " repeat RestOnMessage.name(" + name + ") createRestWebSocketServlet");
|
||||
messageNames.add(name);
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public @interface RestOnMessage {
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
String name() default "";
|
||||
String name();
|
||||
|
||||
/**
|
||||
* 备注描述
|
||||
|
||||
Reference in New Issue
Block a user