使用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)
不起作用