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