Since switching to Vaadin 15, I noticed my rest api is showing private and protected properties without getters.
A stripped down test project confirms this behaviour starts when adding the Vaadin dependencies.
I am using Vaadin on top of Spring Boot
Hi @MarioCombo, thanks for the feedback. Do you have an example project that we can use to reproduce the problem?
You can pull my stripped down project at jsonproblemvaadin15
Looks like it could be related to this https://github.com/vaadin/flow/blob/b0afe77d301ba087650453e119b61fdcd8aedbc4/flow-server/src/main/java/com/vaadin/flow/server/connect/VaadinConnectController.java#L214-L218
Vaadin should not change the default ObjectMapper provided by Spring. It should always create it's own instance. Otherwise it interferes with the developer's application in a way that nobody can predict. There should always be a bean with the Qualifier VAADIN_ENDPOINT_MAPPER_BEAN_QUALIFIER`.
@MarioCombo as a workaround for now, you could create a ObjectMapper bean with the Qualifier "vaadinEndpointMapper"
Thanks again for your feedback and the example project, it really helps. I was able to reproduce it, will start investigating it.
Thank you @knoobie for pointing out the root cause and a workaround already.
Thanks @knoobie! your workaround renders the expected result. I wrapped it in a configuraiton class and pushed it to the workaround branch on my project so people facing the same problem in the future can use it as a template
@MarioCombo you should let the ticket open, so that the Vaadin team can fix it in the future :)
Hi @knoobie, would you like to help to take a look at the PR https://github.com/vaadin/flow/pull/8016 to give some feedback?
Most helpful comment
Thank you @knoobie for pointing out the root cause and a workaround already.