json只是提供mapperException属性的有冲突的setter定义

public void setJanuary(String january) {
    try {
        setJanuary(Float.parseFloat(january));
    } catch (NumberFormatException exception) {
        setJanuary(0);
    }
}public void setJanuary(float january) {
    this.january = january;
}

最佳答案

通过使用注释 @JsonSetter 解决了问题,我们正在使用Json的setter

07-24 19:08