Using jackson 2.1, how do I disable the fail_on_empty beans
that the error message seems to want me to disable?
I\'m assuming this is just the simplest
If you wish to get JSON object without any extra fields - please add this annotation to your class, it worked perfect for me.
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
You can also add in your application.properties file this row, but it will add an extra field to your JSON.
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false