Spring boot webflux json serialization query

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?

Mar.07,2021

Based on spring boot Javadoc, a bean of type JacksonHttpMessageConvertersConfiguration needs an injected ObjectMapper object, thereafter, all you need is to define a bean of type ObjectMapper, like this:

@Bean
ObjectMapper yourMethod() {...}

Please note that, this ObjectMapper would be used for all spring de/serialization, if you want to customize only some properties or some Pojos, use the corresponding jackson annotations, which is off the topic.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4ff17-45066.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4ff17-45066.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?