I want jackson to stop serializing fields that aren't fields, for example isNew()
, which is just a method. So I've added this.
@Configuration
class JacksonConfig extends RepositoryRestConfigurerAdapter {
@Override
public void configureJacksonObjectMapper(ObjectMapper objectMapper) {
objectMapper.setVisibility( PropertyAccessor.IS_GETTER, JsonAutoDetect.Visibility.NONE );
}
}
however recently it seems that if I touch anything with Spring Boot something else breaks (e.g. I disabled getters and hateos stopped working).
Does this have any negative consequences that I haven't encountered yet?