MOKASZ\lw12420 2 years ago
parent
commit
ce5e9b93b8

+ 5 - 2
launch-admin/src/main/java/com/webflux/launchadmin/mysql/controller/lbIn/HomePageInController.java

@@ -47,10 +47,13 @@ public class HomePageInController {
 
     @GetMapping("get2")
     public Mono<Long> test2()   {
-        Mono<Long> count = tempRepository.count();
+        final Mono<Long> longMono = tempRepository.count().onErrorResume(throwable -> {
+            System.out.println(throwable);
+            return Mono.error(new Exception(throwable.getMessage()));
+        });
 //        Mono<List<String>> listMono = Mono.just(List.of("1","2","3"));
 //        Mono<RStatus<List<String>>> rStatusMono = RStatus.successList(listMono);
-        return count;
+        return longMono;
 
     }
     /**