This commit is contained in:
wentch
2016-01-08 12:46:56 +08:00
parent 6f4f92deb2
commit 3f0c64376d
2 changed files with 3 additions and 3 deletions

View File

@@ -315,7 +315,7 @@ public abstract class NodeServer {
diffGroupAddrs.forEach((k, v) -> diffGroupTransports.add(loadTransport(k, server.getProtocol(), v)));
final boolean localed = (sameGroupAddrs.isEmpty() && diffGroupAddrs.isEmpty()) || sameGroupAddrs.contains(this.sncpAddress) || type.getAnnotation(LocalService.class) != null;//本地模式
if (localed && (type.isInterface() || Modifier.isAbstract(type.getModifiers()))) continue; //本地模式不能实例化接口和抽象类的Service类
final ServiceType st = type.getAnnotation(ServiceType.class);
final ServiceResource st = type.getAnnotation(ServiceResource.class);
final Class<? extends Service> resType = st == null ? type : st.value();
if (st != null && (!isSNCP() && factory.find(entry.getName(), resType) != null)) continue;
ServiceWrapper wrapper;