upgrade jackson (#2465)
* fix spring config * fix spring config * fix spring config * minor fix * fix spring-boot module * fix pom * upgrade jackson
This commit is contained in:
parent
b65bccabd1
commit
a0198e143e
|
@ -129,7 +129,7 @@
|
|||
|
||||
<properties>
|
||||
<!-- marshalling -->
|
||||
<jackson.version>2.8.7</jackson.version>
|
||||
<jackson.version>2.9.0</jackson.version>
|
||||
|
||||
<!-- util -->
|
||||
<guava.version>19.0</guava.version>
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SandboxUnitTest {
|
|||
testElement.setX(10);
|
||||
testElement.setY("adasd");
|
||||
final ObjectMapper om = new ObjectMapper();
|
||||
om.setVisibilityChecker(om.getSerializationConfig().getDefaultVisibilityChecker().withFieldVisibility(JsonAutoDetect.Visibility.ANY).withGetterVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
om.setVisibility(om.getSerializationConfig().getDefaultVisibilityChecker().withFieldVisibility(JsonAutoDetect.Visibility.ANY).withGetterVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
|
||||
final String serialized = om.writeValueAsString(testElement);
|
||||
System.err.println(serialized);
|
||||
|
|
|
@ -24,7 +24,6 @@ import com.fasterxml.jackson.core.JsonGenerator;
|
|||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
||||
|
@ -194,7 +193,8 @@ public class JacksonSerializationIgnoreUnitTest {
|
|||
@Test
|
||||
public final void givenIgnoringMapNullValue_whenWritingMapObjectWithNullValue_thenIgnored() throws JsonProcessingException {
|
||||
final ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
|
||||
// mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
|
||||
mapper.setSerializationInclusion(Include.NON_NULL);
|
||||
|
||||
final MyDto dtoObject1 = new MyDto();
|
||||
|
||||
|
|
Loading…
Reference in New Issue