Spring Boot 2 generic JPA converter to serialize and deserialize an entity attribute as JSON

1 · Sunit Katkar · May 10, 2018, 7:10 p.m.
As I wrote in my previous blog post, I needed to store some custom attributes of entities as JSON strings in the database. Sometimes an entity attribute is not just a native or simple type like a Date, Long or String. A Java POJO like structure is required as an attribute. One might argue that a separate entity should be created which results in a separate table and a reference to it should be used like in a OneToOne or ManyToOne or OneToMany type of relationship. But there are special business...