diff --git a/test/org/redkale/test/rest/HelloService.java b/test/org/redkale/test/rest/HelloService.java index de80d82fb..fac6b6cf8 100644 --- a/test/org/redkale/test/rest/HelloService.java +++ b/test/org/redkale/test/rest/HelloService.java @@ -88,6 +88,7 @@ public class HelloService implements Service { //异步查询单个 @RestMapping(name = "asyncfind") public CompletableFuture asyncFindHello(@RestParam(name = "#") int id) { //通过 /pipes/hello/find/1234、/pipes/hello/jsfind/1234 查询对象 - return source.findAsync(HelloEntity.class, id); + if (source != null) source.findAsync(HelloEntity.class, id); + return CompletableFuture.completedFuture(new HelloEntity()); } }