-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Just curious if i am missing something in this article or is providing a WebMvcConfigurationSupport
falling under what is decribed "Without Spring Boot".
I am providing a custom Jackson2ObjectMapperBuilder
via an imported configuration class but it is not used by the MappingJackson2HttpMessageConverter
. I am not using @EnableMvc
because i have to customize the mvc configuration by extending the WebMvcConfigurationSupport
which internally creates the MessageConverter without requesting my jacksonBuilder bean :
if (jackson2Present) {
messageConverters.add(new MappingJackson2HttpMessageConverter());
}
Here is the WebConfig which gets imported:
@Configuration
public class WebConfig extends WebMvcConfigurationSupport {
@Bean
MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
...
return factory.createMultipartConfig();
}
}
And here the configuration object which provides a custom jackson builder:
@Configuration
public class JsonConfig {
@Bean
public Jackson2ObjectMapperBuilder jacksonBuilder() {
return new Jackson2ObjectMapperBuilder()
.indentOutput(true)
.serializers(...)
;
}
}
Metadata
Metadata
Assignees
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid