I am trying to run the main method where the main method calls another method(Bmethod) which I need to run in the background but I need the main method response immediately without waiting for Bmethod response. I need to use java reactive code(webflux).
public static void main(String[] args) {
String abc= Mono.just(Bmethod()).block();
System.out.println("AAAAAAA");
}
public static String Bmethod() {
System.out.println("BBBBBBBB");
return "AACALL";
}
I want to print AAAAAAA and then only BBBBBBBB without waiting Bmethod response. How to achieve using reactive mono Java.