Return value doesn't serialize to JSON when return type is Mono of Interface in WebFlux #22803
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
In WebMVC type application, Spring's message converter can convert the return value to a proper message(like a JSON) when controller return type declared by interface.
But, Webflux's behavior is different.
For example, we have Car class that implements Vehicle interface.
And then there is a controller method like that.
I can get a json response of Car class with
content-type: application/json
header.But, webflux's result is defferent.
It only supports a 'content-type: text/event-stream' when return type is a mono of interface.
Is it a bug?
The text was updated successfully, but these errors were encountered: