problem encountered: when developing with spring-boot-starter-webflux
, use the default jackson
to serialize and deserialize JSON, but when the attributes in my javaBean use hump naming, I want to serialize it into a JSON string and get the json key, of Hungarian nomenclature, but failed. This is my configuration code
@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter jsonConverter = new MappingJackson2HttpMessageConverter();
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
jsonConverter.setObjectMapper(objectMapper);
return jsonConverter;
}
excuse me, why is this?