Skip to content

Instantly share code, notes, and snippets.

@donchan922
Created July 7, 2019 06:43
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 donchan922/ccabe89ea6b9aa1da9a67eb61608c472 to your computer and use it in GitHub Desktop.
Save donchan922/ccabe89ea6b9aa1da9a67eb61608c472 to your computer and use it in GitHub Desktop.
// CSVの各項目を読み込む順序を設定する
@JsonPropertyOrder({"id", "name", "age"})
public class User {
private String id;
private String name;
private int age;
public User(String id, String name, int age) {
this.id = id;
this.name = name;
this.age = age;
}
// デフォルトコンストラクタを定義する必要がある
public User() {
}
// getter, setter, toStringは省略
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment