jackson的ObjectMapper忽略大小写与驼峰命名
@Autowiredprivate ObjectMapper mapper;mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);// deprecatedmapper.setPropertyNamingStrategy(PropertyNamingStrateg...
·
@Autowired
private ObjectMapper mapper;
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
// deprecated mapper.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
更多推荐
已为社区贡献1条内容
所有评论(0)