This commit is contained in:
@@ -58,14 +58,13 @@ public final class Application {
|
|||||||
|
|
||||||
//当前Service的IP地址+端口 类型: SocketAddress、InetSocketAddress、String
|
//当前Service的IP地址+端口 类型: SocketAddress、InetSocketAddress、String
|
||||||
public static final String RESNAME_SERVER_ADDR = "SERVER_ADDR"; // SERVER_ADDR
|
public static final String RESNAME_SERVER_ADDR = "SERVER_ADDR"; // SERVER_ADDR
|
||||||
|
|
||||||
//当前SNCP Server所属的组 类型: String
|
//当前SNCP Server所属的组 类型: String
|
||||||
public static final String RESNAME_SERVER_GROUP = "SERVER_GROUP";
|
public static final String RESNAME_SERVER_GROUP = "SERVER_GROUP";
|
||||||
|
|
||||||
//当前Service所属的组 类型: Set<String>、String[]
|
//当前Service所属的组 类型: Set<String>、String[]
|
||||||
public static final String RESNAME_SNCP_GROUPS = Sncp.RESNAME_SNCP_GROUPS; // SNCP_GROUPS
|
public static final String RESNAME_SNCP_GROUPS = Sncp.RESNAME_SNCP_GROUPS; // SNCP_GROUPS
|
||||||
|
|
||||||
|
|
||||||
protected final ResourceFactory factory = ResourceFactory.root();
|
protected final ResourceFactory factory = ResourceFactory.root();
|
||||||
|
|
||||||
protected final WatchFactory watch = WatchFactory.root();
|
protected final WatchFactory watch = WatchFactory.root();
|
||||||
@@ -432,8 +431,9 @@ public final class Application {
|
|||||||
: Sncp.createLocalService("", serviceClass, null, new LinkedHashSet<>(), null, null);
|
: Sncp.createLocalService("", serviceClass, null, new LinkedHashSet<>(), null, null);
|
||||||
application.init();
|
application.init();
|
||||||
application.factory.register(service);
|
application.factory.register(service);
|
||||||
new NodeSncpServer(application, new CountDownLatch(1), null).init(application.config);
|
final NodeServer server = new NodeHttpServer(application, new CountDownLatch(1), null);
|
||||||
application.factory.inject(service);
|
server.init(application.config);
|
||||||
|
server.factory.inject(service);
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user