Configuring ObjecMapper null serialization after first serialization does not have effect
问题 Stumbled on this behavior when making some experiments with ObjectMapper . See Junit5 test cases below and what those print for me in comments. class TestIt { private ObjectMapper om = new ObjectMapper(); private TestClass testClass = new TestClass(); @Getter @Setter public class TestClass { private final String value = LocalDate.now().toString(); private String valueLeftNull; } @Test void defaultMapping() throws JsonProcessingException { System.out.println(om.writeValueAsString(testClass));