I'm trying to get data from my UserRepository
that extends R2dbcRepository
like the code below
public interface UserRepository extends R2dbcRepository<UserEntity, Long> {
Mono<UserEntity> findByEmail(String email);
}
this repository works fine on saving UserEntity
instance but it doent't work when I call findByEmail
method. I wrote a test with log()
before subscribe to debug like the code below:
@Test
void test2(){
this.userRepository.findByEmail("example@email.com").log().subscribe();
}
But on the console, the it doesn't show the onComplete
or even onNext
like a normal publisher should. instead, it only shows this message:
[main] reactor.Mono.Next.1 : onSubscribe(MonoNext.NextSubscriber)
[main] reactor.Mono.Next.1 : request(unbounded)
and of course, I have data in my database that has that email name:
Is there any step I miss? Thanks!