Become compatible with Jackson 2.10 while remaining 2.9 compatible

See gh-17999
This commit is contained in:
Andy Wilkinson
2019-09-05 17:13:45 +01:00
parent 65917890d3
commit 58eddb8fa4
2 changed files with 3 additions and 2 deletions

View File

@@ -165,6 +165,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
protected void configureObjectMapper(ObjectMapper mapper) {
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
mapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false);
mapper.configure(MapperFeature.USE_STD_BEAN_NAMING, true);
mapper.setSerializationInclusion(Include.NON_NULL);
applyConfigurationPropertiesFilter(mapper);

View File

@@ -31,9 +31,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
*/
public class JacksonJsonParser extends AbstractJsonParser {
private static final TypeReference<?> MAP_TYPE = new MapTypeReference();
private static final MapTypeReference MAP_TYPE = new MapTypeReference();
private static final TypeReference<?> LIST_TYPE = new ListTypeReference();
private static final ListTypeReference LIST_TYPE = new ListTypeReference();
private ObjectMapper objectMapper; // Late binding