Skip to content
Advertisement

How to initialize an empty Mono Class object in reactive programming?

I am learning reactive and I wanted to know how to initialize a Mono object, like in Java when:User usr=new User().

How to create a Mono object of this similar class?

Advertisement

Answer

There are different ways you can create an object. Checkout this link for better understanding https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html Here you can just use the Mono.just(new User());

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement