I am new to reactive java and working on spring boot project. I have a method in controller class, which takes id and return Mono. its works fine and retrun response with data.
It returns blank and no data but 200 status when I uncomment a line @ValidateParam(name = StringValidator.class) annotation in this method.
@GetMapping("/vendor/id/{id}")
//@ValidateParam(name = StringValidator.class)
public Mono<Vendor> getVendor(@PathVariable("id") String id){
//get specific vendor
return vendorService.getVendorByID(id);
}
I have created my custom validator to validate the id, I receive as param to this method.I am running the validator using pointcut. I check the joint point and if there is no error I use proceed method from ProceedingJoinPoint
Any help is much appreciated? I can not understand what is wrong here.
Upon debug, I find when there is on validation error in id, method proceeds and I can print the data when I subscribe to Mono. But it return blank when I return same mono.