I have some entry points with JAXRS and jackson serialization/deserialization, but for some values we want to capitalize it as
WordUtils.capitalizeFully(str, ' ', '-')
i am using lombok and jackson 2.9.8
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Getter @Setter
Class User{
@Column(length = 100, nullable = true)
@Size(max = 100, message = "USER_FIRSTNAME_SIZE")
private String firstName;
@Column(length = 100, nullable = true)
@Size(max = 100, message = "USER_LASTNAME_SIZE")
private String lastName;
}
When I insert a user for example:
{"lastName":"smith-test","firstname":"john"}
i want to save "Smith-Test John", I am using annotations so i don't know how to proceed, before we had manual insert with JsonObject, but now we're passing in full jackson and automatic mapping