Tag: annotation introspector

如何实现`Jackson AnnotationIntrospector`?

我想创建两个自定义属性: class A{ @IgnoreLevel(“Debug”) String str1; @IgnoreLevel(“Info”) String str2; } 或者更喜欢这样: class A{ @Debug String str1; @Info String str2; } 我希望写一个配置,使objectMapper被忽略 “defug”和”info” 。 另一种配置只在序列化和反序列化时忽略带“info”的字段。 但我读过的所有post( post1 , post2 )都没有显示如何实现服装configuration \ AnnotationIntrospector的示例。