Relevant tags:
- Spring Boot 2.7.6
- JUnit 5
- JPA
Error Message:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.yourcompany.entity.Table$HibernateProxy$3enmhWuU["hibernateLazyInitializer"])
Reference URL: https://stackoverflow.com/a/67354659/6462295
Adding annotation below to your entity.
@com.fasterxml.jackson.annotation.JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
No comments:
Post a Comment