Stakover flow error with Jackson applied on JPA Entities to generate JSON

冷暖自知 提交于 2019-12-02 03:20:06

It looks like you use Yasson project not Jackson. In that case you should use @JsonbTransient annotation. See documentation:

By default, JSONB ignores properties with a non public access. All public properties - either public fields or non public fields with public getters are serialized into JSON text.

Excluding properties can be done with a @JsonbTransient annotation. Class properties annotated with @JsonbTransient annotation are ignored by JSON Binding engine. The behavior is different depending on where @JsonbTransient annotation is placed.

See also:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!