Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Usage of ConstructorProperties annotation when removing setters and zero-args constructor
import java.beans.ConstructorProperties;
public class JacksonBean {
private final int value;
private final String another;
@ConstructorProperties({"value", "another"})
public JacksonBean(int value, String another) {
this.value = value;
this.another = another;
}
public int getValue() {
return value;
}
public String getAnother() {
return another;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment