I'm trying to adapt the postgresql repository deleteById method which return void to return Mono<Void>
the repository is a service that I autowired, I use it like this
repository.deleteById(id) with String id as the argument
I'm trying to adapt the postgresql repository deleteById method which return void to return Mono<Void>
the repository is a service that I autowired, I use it like this
repository.deleteById(id) with String id as the argument
If you want to use reactive stack, then you should use spring-data-r2dbc, which provides
ReactiveCrudRepositoryand methodMono<Void> deleteById(ID id).If for some reason you need to use a synchronous method, then you could wrap
deleteByIdcall using Mono.fromRunnableHowever, this should be avoided, because then you get no benefits of using reactive stack.