有可能是jackson解析配置问题
需要确认是否开启了以0开始读取信息

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

@Bean
public HttpMessageConverter<String> responseBodyConverter(){
    StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
    return converter;
}
@Bean
public ObjectMapper getObjectMapper() {

    ObjectMapper objectMapper = new ObjectMapper();
    //是否允许JSON整数以多个0开始
    objectMapper.configure(JsonParser.Feature.ALLOW_NUMERIC_LEADING_ZEROS, true);
    return objectMapper;
}

}

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐