MyInt.java
public class MyInt() implements Serializable {
private static final long serialVersionUID = -1L;
private int myInt;
public MyInt(Integer i) {
this.myInt = i;
}
}
TestModel.java
public class TestModel extends Model {
public MyInt myInt;
}
如何从YML中填充它。我试过 -
MyInt(test):
myInt: 5
但是,它没有用。
答案 0 :(得分:1)
正在使用snakeyml。检查this以查找自定义java bean
这个答案也可能有所帮助:Mapping BigInteger in YAML file with PlayFramework