This commit is contained in:
@@ -180,6 +180,7 @@ public final class Rest {
|
|||||||
if (EXCLUDERMETHODS.contains(method.getName())) continue;
|
if (EXCLUDERMETHODS.contains(method.getName())) continue;
|
||||||
if ("init".equals(method.getName())) continue;
|
if ("init".equals(method.getName())) continue;
|
||||||
if ("destroy".equals(method.getName())) continue;
|
if ("destroy".equals(method.getName())) continue;
|
||||||
|
if ("version".equals(method.getName())) continue;
|
||||||
|
|
||||||
RestMapping[] mappings = method.getAnnotationsByType(RestMapping.class);
|
RestMapping[] mappings = method.getAnnotationsByType(RestMapping.class);
|
||||||
boolean ignore = false;
|
boolean ignore = false;
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ public final class SncpClient {
|
|||||||
if (method.getName().equals("equals") || method.getName().equals("hashCode")) continue;
|
if (method.getName().equals("equals") || method.getName().equals("hashCode")) continue;
|
||||||
if (method.getName().equals("notify") || method.getName().equals("notifyAll") || method.getName().equals("wait")) continue;
|
if (method.getName().equals("notify") || method.getName().equals("notifyAll") || method.getName().equals("wait")) continue;
|
||||||
if (method.getName().equals("init") || method.getName().equals("destroy")) continue;
|
if (method.getName().equals("init") || method.getName().equals("destroy")) continue;
|
||||||
|
if (method.getName().equals("version") || method.getName().equals("name")) continue;
|
||||||
//if (onlySncpDyn && method.getAnnotation(SncpDyn.class) == null) continue;
|
//if (onlySncpDyn && method.getAnnotation(SncpDyn.class) == null) continue;
|
||||||
DLong actionid = Sncp.hash(method);
|
DLong actionid = Sncp.hash(method);
|
||||||
Method old = actionids.get(actionid);
|
Method old = actionids.get(actionid);
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public final class SncpDynServlet extends SncpServlet {
|
|||||||
if (method.getName().equals("getClass") || method.getName().equals("toString")) continue;
|
if (method.getName().equals("getClass") || method.getName().equals("toString")) continue;
|
||||||
if (method.getName().equals("equals") || method.getName().equals("hashCode")) continue;
|
if (method.getName().equals("equals") || method.getName().equals("hashCode")) continue;
|
||||||
if (method.getName().equals("notify") || method.getName().equals("notifyAll") || method.getName().equals("wait")) continue;
|
if (method.getName().equals("notify") || method.getName().equals("notifyAll") || method.getName().equals("wait")) continue;
|
||||||
if (method.getName().equals("init") || method.getName().equals("destroy") || method.getName().equals("name")) continue;
|
if (method.getName().equals("init") || method.getName().equals("destroy")) continue;
|
||||||
|
if (method.getName().equals("version") || method.getName().equals("name")) continue;
|
||||||
final DLong actionid = Sncp.hash(method);
|
final DLong actionid = Sncp.hash(method);
|
||||||
SncpServletAction action = SncpServletAction.create(service, actionid, method);
|
SncpServletAction action = SncpServletAction.create(service, actionid, method);
|
||||||
action.convert = convert;
|
action.convert = convert;
|
||||||
|
|||||||
@@ -44,4 +44,14 @@ public interface Service {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service的接口版本号
|
||||||
|
* <b>注: public方法的参数或返回类型或参数类型内部变更后改值必须进行改变</b>
|
||||||
|
*
|
||||||
|
* @return 接口版本号
|
||||||
|
*/
|
||||||
|
default int version() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user