spring.jackson.deserialization.USE_BIG_DECIMAL_FOR_FLOATS:true not not working

时间:2018-01-30 09:07:51

标签: java spring-boot

使用spring.jackson.deserialization.USE_BIG_DECIMAL_FOR_FLOATS:true以保留尾随零,但遗憾的是无法正常工作。我也试过

@Bean
public Jackson2ObjectMapperBuilder jacksonBuilder() {
    Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
    builder.indentOutput(true);
    builder.featuresToEnable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
    return builder;
}

这也不起作用,indentOutput(true)工作正常,但featuresToEnable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)不起作用

0 个答案:

没有答案