This commit is contained in:
Redkale
2016-09-23 10:03:49 +08:00
parent 4fb218fd18
commit 6f056bbcb6
4 changed files with 19 additions and 6 deletions

View File

@@ -180,6 +180,7 @@ public final class Rest {
if (EXCLUDERMETHODS.contains(method.getName())) continue;
if ("init".equals(method.getName())) continue;
if ("destroy".equals(method.getName())) continue;
if ("version".equals(method.getName())) continue;
RestMapping[] mappings = method.getAnnotationsByType(RestMapping.class);
boolean ignore = false;

View File

@@ -177,6 +177,7 @@ public final class SncpClient {
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("init") || method.getName().equals("destroy")) continue;
if (method.getName().equals("version") || method.getName().equals("name")) continue;
//if (onlySncpDyn && method.getAnnotation(SncpDyn.class) == null) continue;
DLong actionid = Sncp.hash(method);
Method old = actionids.get(actionid);

View File

@@ -62,7 +62,8 @@ public final class SncpDynServlet extends SncpServlet {
if (method.getName().equals("getClass") || method.getName().equals("toString")) 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("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);
SncpServletAction action = SncpServletAction.create(service, actionid, method);
action.convert = convert;
@@ -182,9 +183,9 @@ public final class SncpDynServlet extends SncpServlet {
* }
* </pre></blockquote>
*
* @param service Service
* @param service Service
* @param actionid 操作ID
* @param method 方法
* @param method 方法
*
* @return SncpServletAction
*/

View File

@@ -44,4 +44,14 @@ public interface Service {
}
/**
* Service的接口版本号
* <b>注: public方法的参数或返回类型或参数类型内部变更后改值必须进行改变</b>
*
* @return 接口版本号
*/
default int version() {
return 0;
}
}