I am working with a project that is generated with jhipster. It is a micro service architecture project.
In my entity class properties are named with camel case. So when I create a rest service it gives me json, where the json property names are as same as the entity properties.
Entity class
@Entity
@Table(name = "ebook")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "ebook")
public class Ebook implements Serializable {
private Long id;
private String nameBangla;
private String nameEnglish;
Json response
{
"id": 0,
"nameBangla": "string",
"nameEnglish": "string"
}
I want that my entity property will camel case, But in json response it will snake case. That is I don't want to change my entity class but I want to change my json response like bellow
{
"id": 0,
"name_bangla": "string",
"name_english": "string"
}