mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
}
SimpleFilterProvider filterProvider = new SimpleFilterProvider();
filterProvider = filterProvider.addFilter("ConsumerFilter",
new MultiFilter(new HateoasBeanPropertyFilter(), new DynamicPropertyFilter()));
filterProvider = filterProvider.addFilter("EntitlementFilter",
new MultiFilter(new HateoasBeanPropertyFilter(), new DynamicPropertyFilter()));
filterProvider = filterProvider.addFilter("OwnerFilter",
new MultiFilter(new HateoasBeanPropertyFilter(), new DynamicPropertyFilter()));
filterProvider = filterProvider.addFilter("GuestFilter",
new MultiFilter(new HateoasBeanPropertyFilter(), new DynamicPropertyFilter()));
filterProvider.setDefaultFilter(new DynamicPropertyFilter());
filterProvider.setFailOnUnknownId(false);
mapper.setFilters(filterProvider);
AnnotationIntrospector primary = new JacksonAnnotationIntrospector();