public static <T> ObjectWriter getObjectWriter(@Nonnull Class<T> targetClass) {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.DEFAULT_VIEW_INCLUSION, false);
return mapper.writerWithView(targetClass);
}
public static String writeSuccessObjectWithView(@Nonnull Object object, @Nonnull Class view) {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.DEFAULT_VIEW_INCLUSION, false);