|
|
|
@ -127,14 +127,14 @@ public class ConfigSupport {
|
|
|
|
|
|
|
|
|
|
private ObjectMapper createMapper(JsonFactory mapping) { |
|
|
|
|
ObjectMapper mapper = new ObjectMapper(mapping); |
|
|
|
|
// mapper.addMixIn(MasterSlaveServersConfig.class, MasterSlaveServersConfigMixIn.class);
|
|
|
|
|
// mapper.addMixIn(SingleServerConfig.class, SingleSeverConfigMixIn.class);
|
|
|
|
|
// mapper.addMixIn(Config.class, ConfigMixIn.class);
|
|
|
|
|
// mapper.addMixIn(Codec.class, ClassMixIn.class);
|
|
|
|
|
// mapper.addMixIn(LoadBalancer.class, ClassMixIn.class);
|
|
|
|
|
// FilterProvider filterProvider = new SimpleFilterProvider()
|
|
|
|
|
// .addFilter("classFilter", SimpleBeanPropertyFilter.filterOutAllExcept());
|
|
|
|
|
// mapper.setFilterProvider(filterProvider);
|
|
|
|
|
mapper.addMixIn(MasterSlaveServersConfig.class, MasterSlaveServersConfigMixIn.class); |
|
|
|
|
mapper.addMixIn(SingleServerConfig.class, SingleSeverConfigMixIn.class); |
|
|
|
|
mapper.addMixIn(Config.class, ConfigMixIn.class); |
|
|
|
|
mapper.addMixIn(Codec.class, ClassMixIn.class); |
|
|
|
|
mapper.addMixIn(LoadBalancer.class, ClassMixIn.class); |
|
|
|
|
FilterProvider filterProvider = new SimpleFilterProvider() |
|
|
|
|
.addFilter("classFilter", SimpleBeanPropertyFilter.filterOutAllExcept()); |
|
|
|
|
mapper.setFilterProvider(filterProvider); |
|
|
|
|
mapper.setSerializationInclusion(Include.NON_NULL); |
|
|
|
|
return mapper; |
|
|
|
|
} |
|
|
|
|