First, add the following dependency to your project (Maven):
com.fasterxml.jackson.datatype
jackson-datatype-hibernate5
${jackson.version}
Further, add the following bean:
@Bean
public Module datatypeHibernateModule() {
return new Hibernate5Module();
}