I use SpringBoot v2.2.2RELEASE (very old version) and I configured a custom Module as follow:
@Configuration
public class JacksonConfig {
@Bean
public Module jacksonModule() {
SimpleModule module = new SimpleModule();
module.addSerializer(Object.class, new MyCustomSerializer());
return module;
}
}
This works well and it does what it supposed to do.
Recently, I've upgraded to the lates SpringBoot 2.7.0 and the serializer gets ignored! I can see that when my app loads then it instantiates a new Module
instance, but it doesn't call the serializer anymore...
(What the serializer does is add a root node to the response (json) that returns to the client via REST Controller).
Any idea?
EDIT1
I tried to debug it by put a breakpoint in JacksonAuthConfiguration#configureModules
and I saw the module in the list as well as some other Swagger related modules.