Skip to content

[Spring] [Reactive] Controller parameters wrapped in Mono #4273

@ilyas-keser

Description

@ilyas-keser

A generated controller method for Webflux (spring, reactive) look like this:

public Mono<ResponseEntity<MyModel>> createModel(
    @Valid @RequestBody Mono<MyCreateModel> myCreateModel,
        ServerWebExchange exchange) throws Exception { ...

Q1: Why is myCreateModel parameter wrapped with a Mono?

Q2: Do I need ServerWebExchange param? If not, can I disable the generation?

Thx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions