public class SpringHandlerInstantiator extends HandlerInstantiator
JsonSerializer
, JsonDeserializer
,
KeyDeserializer
, TypeResolverBuilder
, TypeIdResolver
) beans by
type from Spring ApplicationContext
. If no bean is found, the default behavior
happen (calling no-argument constructor via reflection).Jackson2ObjectMapperBuilder.handlerInstantiator(HandlerInstantiator)
,
HandlerInstantiator
Constructor and Description |
---|
SpringHandlerInstantiator(AutowireCapableBeanFactory beanFactory)
Create a new SpringHandlerInstantiator for the given BeanFactory.
|
Modifier and Type | Method and Description |
---|---|
JsonDeserializer<?> |
deserializerInstance(DeserializationConfig config,
Annotated annotated,
Class<?> deserClass) |
KeyDeserializer |
keyDeserializerInstance(DeserializationConfig config,
Annotated annotated,
Class<?> serClass) |
JsonSerializer<?> |
serializerInstance(SerializationConfig config,
Annotated annotated,
Class<?> keyDeserClass) |
TypeIdResolver |
typeIdResolverInstance(MapperConfig<?> config,
Annotated annotated,
Class<?> resolverClass) |
TypeResolverBuilder<?> |
typeResolverBuilderInstance(MapperConfig<?> config,
Annotated annotated,
Class<?> resolverClass) |
converterInstance, namingStrategyInstance, objectIdGeneratorInstance, valueInstantiatorInstance
public SpringHandlerInstantiator(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic JsonSerializer<?> serializerInstance(SerializationConfig config, Annotated annotated, Class<?> keyDeserClass)
serializerInstance
in class HandlerInstantiator
public JsonDeserializer<?> deserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> deserClass)
deserializerInstance
in class HandlerInstantiator
public KeyDeserializer keyDeserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> serClass)
keyDeserializerInstance
in class HandlerInstantiator
public TypeResolverBuilder<?> typeResolverBuilderInstance(MapperConfig<?> config, Annotated annotated, Class<?> resolverClass)
typeResolverBuilderInstance
in class HandlerInstantiator
public TypeIdResolver typeIdResolverInstance(MapperConfig<?> config, Annotated annotated, Class<?> resolverClass)
typeIdResolverInstance
in class HandlerInstantiator