MappingJackson2HttpMessageConverter objConverter = new MappingJackson2HttpMessageConverter();
ObjectMapper objMapper = new ObjectMapper();
objMapper.setVisibility(PropertyAccessor.FIELD, Visibility.NONE);
objMapper.getSerializationConfig().withView(View.class);
objConverter.setObjectMapper(objMapper);
objConverter.getObjectMapper().getSerializationConfig().withView(View.class);
after
objMapper.getSerializationConfig()
has different reference than SerializationConfig
created with method (..).withView(..)
It look as if new SerializationConfig
is not applied to objMapper
Hot to solve this issue? Also my @JsonView annotations are not working.
fasterxml.jackson 2.3.0