Class JacksonUtils
- java.lang.Object
-
- org.springframework.kafka.support.JacksonUtils
-
public final class JacksonUtils extends java.lang.ObjectThe utilities for JacksonObjectMapperinstances.- Since:
- 2.3
- Author:
- Artem Bilan
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.ObjectMapperenhancedObjectMapper()Factory forObjectMapperinstances with registered well-known modules and disabledMapperFeature.DEFAULT_VIEW_INCLUSIONandDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESfeatures.static com.fasterxml.jackson.databind.ObjectMapperenhancedObjectMapper(java.lang.ClassLoader classLoader)Factory forObjectMapperinstances with registered well-known modules and disabledMapperFeature.DEFAULT_VIEW_INCLUSIONandDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESfeatures.
-
-
-
Method Detail
-
enhancedObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper enhancedObjectMapper()
Factory forObjectMapperinstances with registered well-known modules and disabledMapperFeature.DEFAULT_VIEW_INCLUSIONandDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESfeatures. TheClassUtils.getDefaultClassLoader()is used for loading module classes.- Returns:
- the
ObjectMapperinstance.
-
enhancedObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper enhancedObjectMapper(java.lang.ClassLoader classLoader)
Factory forObjectMapperinstances with registered well-known modules and disabledMapperFeature.DEFAULT_VIEW_INCLUSIONandDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESfeatures.- Parameters:
classLoader- theClassLoaderfor modules to register.- Returns:
- the
ObjectMapperinstance.
-
-