-
-
Save douglarek/ed0f180e17ae22469ca0c15f88d0988b to your computer and use it in GitHub Desktop.
Immutable Data with builder and proper Jackson mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.cpg.test; | |
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | |
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | |
import lombok.Builder; | |
import lombok.Value; | |
@Value | |
@Builder(builderClassName = "Builder") | |
@JsonDeserialize(builder = ImmutableData.Builder.class) | |
public class ImmutableData { | |
private final int someInt; | |
private final String someString; | |
@JsonPOJOBuilder(withPrefix = "") | |
public static final class Builder { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment