@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);
jackson的ObjectMapper忽略大小写与驼峰命名
猜你喜欢
转载自blog.csdn.net/c5113620/article/details/102851742
今日推荐
周排行