-
Notifications
You must be signed in to change notification settings - Fork 41.2k
@JsonComponent (JsonSerializer) not picked up for WebFlux serialization #9485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ok, digging deeper into this topic I recognize that there's a From an end users point of view wouldn't it be nice to have that automatically as Spring Boot with Web MVC already does?
|
Duplicates #9166 ? |
Think so, too! |
Is there also a ticket to make those Encoders and Decoders register with I can open a new ticket if it should… |
It must be the exact same issue. |
I'm not sure. There are maybe several issues here. Given the additional configuration class above, the following
The Next problem complex is the Would be great if you have a look at the updated sample and decide wether to create a new ticket or not… |
@michael-simons there are indeed several issues here and I think we can address them in a general way via #9166. We have a reference to your project now so we can review it at that time. If you want an issue focused on the client, feel free to create a separate issue. This one, as initially described is really a duplicate. |
I have a
@JsonComponent
that extends JsonSerializer:for this object:
Using Spring Web MVC it gets picked up automatically in Spring Boot, so that a controller returning SomeObject as JSON renders
{"a":"aa"}
.However when used with WebFlux, I see
SomeObjectSerializer
initialized but never used, the following controlleralways renders
{"a":"aa","b":"bb"}
My expectation is the serializer picked up as one is used to with Web MVC. The docs (neither Spring Framework or Boot) give me any indication that it should not be the case with the new
Jackson2JsonDecoder
and encoder classes.Demo project with test is attached.
InitializrSpringbootProject.zip
The text was updated successfully, but these errors were encountered: