This commit is contained in:
@@ -23,8 +23,8 @@ public class _DynHelloRestServlet1 extends SimpleRestServlet {
|
||||
HelloService service = new HelloService();
|
||||
HttpServer server = new HttpServer();
|
||||
|
||||
server.addRestServlet(HelloService.class, "", service, SimpleRestServlet.class, "/pipes", null);
|
||||
server.addRestServlet(HelloService.class, "my-res", new HelloService(3), SimpleRestServlet.class, "/pipes", null);
|
||||
server.addRestServlet(HelloService.class, "", service, SimpleRestServlet.class, "/pipes");
|
||||
server.addRestServlet(HelloService.class, "my-res", new HelloService(3), SimpleRestServlet.class, "/pipes");
|
||||
|
||||
DefaultAnyValue conf = DefaultAnyValue.create("port", "" + port);
|
||||
server.init(conf);
|
||||
|
||||
@@ -154,7 +154,7 @@ public class SncpTest {
|
||||
final Transport transport = new Transport("", WatchFactory.root(), "", newBufferPool(), newChannelGroup(), null, set);
|
||||
SncpTestService service = Sncp.createLocalService("", null, ResourceFactory.root(), SncpTestService.class, addr, transport, null);
|
||||
ResourceFactory.root().inject(service);
|
||||
server.addService(new ServiceWrapper(service, "", "", new HashSet<>(), null));
|
||||
server.addSncpServlet(new ServiceWrapper(service, "", "", new HashSet<>(), null));
|
||||
System.out.println(service);
|
||||
AnyValue.DefaultAnyValue conf = new AnyValue.DefaultAnyValue();
|
||||
conf.addValue("host", "0.0.0.0");
|
||||
@@ -187,7 +187,7 @@ public class SncpTest {
|
||||
//String name, WatchFactory, ObjectPool<ByteBuffer>, AsynchronousChannelGroup, InetSocketAddress clientAddress, Collection<InetSocketAddress>
|
||||
final Transport transport = new Transport("", WatchFactory.root(), "", newBufferPool(), newChannelGroup(), null, set);
|
||||
Service service = Sncp.createLocalService("", null, ResourceFactory.root(), SncpTestService.class, addr, transport, null);
|
||||
server.addService(new ServiceWrapper(service, "", "", new HashSet<>(), null));
|
||||
server.addSncpServlet(new ServiceWrapper(service, "", "", new HashSet<>(), null));
|
||||
AnyValue.DefaultAnyValue conf = new AnyValue.DefaultAnyValue();
|
||||
conf.addValue("host", "0.0.0.0");
|
||||
conf.addValue("port", "" + port2);
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.redkale.convert.json.*;
|
||||
public class SncpTestBean implements FilterBean {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private long id;
|
||||
|
||||
private String content;
|
||||
|
||||
Reference in New Issue
Block a user