I don't know well , Post a question.
I used Jackson Json Libraries with SpringBoot
When i use @JsonSerialize(using = CustomSerializer.class) in severals DTO
class Field
CustomSerializer has no-args constructor with "initialized" logging command
public class CustomSerializer extends JsonSerializer<String> {
public CustomSerializer() {
super();
log.info("initialize : {}", this);
}
@Override
public void serialize(String value, JsonGenerator gen,
SerializerProvider serializers) throws IOException {
gen.writeString("Custom-" + value);
}
}
Jackson create Serializer instance for Each DTO class on Json Serialize
Process.
how can i create Serializer single instance, and share this.
is it right thinking?
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/a1e62135-f84f-459d-9f8d-93609b0db14do%40googlegroups.com.