Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Created April 10, 2018 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/b1657f0a31c1ad95d85a9500b197d49d to your computer and use it in GitHub Desktop.
Save tassioauad/b1657f0a31c1ad95d85a9500b197d49d to your computer and use it in GitHub Desktop.
public class Property {
private PropertyType type;
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public PropertyType getType() {
return type;
}
}
public enum PropertyType {
SYSTEM_PROPERTY(0, "Propriedades do sistema"), SYSTEM_ENVYRONMENT(1, "Propriedades do ambiente"), APPLICATION_CONFIGURATION(2, "Configuração da aplicaçaõ");
private int codigo;
private String descricao;
PropertyType(int codigo, String descricao) {
this.codigo = codigo;
this.descricao = descricao;
}
}
{"type": {"codigo": 0,"descricao":"Propriedades do sistema"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment