Closed fcappi closed 2 months ago
Hey @fcappi. As you noticed, .then(Mono.fromSupplier(...))
is accomplishing what you are looking for. There have been similar requests in the past (#2464, #3640) and they have been declined due to existing API combinations that allow to reach the end goal and because growing the API to minize typing is not a goal for the project ATM. The easiest implementation for this would be to just delegate to Mono.fromSupplier
and aside from saving a few key strokes it brings no performance benefit or others for the cost of added API surface and maintenance cost. With that, I'm sorry to decline the proposal at this time.
Summary
Provide a way for using a Supplier with then() operator
Motivation
We always need to use Mono.supplier on .then() operator to avoid code being executed on assembly time. So the goal is to save some lines of code since this is a recurrent need.
Desired solution