Class JsonAutowiringConfiguration
java.lang.Object
de.kaiserpfalzedv.commons.spring.jackson.JsonAutowiringConfiguration
Enables the usage of
Autowired
in Json objects.- Since:
- 2023-12-08
- Version:
- 1.0.0
- Author:
- klenkes74 <rlichti@kaiserpfalz-edv.de>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.cfg.HandlerInstantiator
handlerInstantiator
(org.springframework.context.ApplicationContext applicationContext) org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
objectMapperBuilder
(com.fasterxml.jackson.databind.cfg.HandlerInstantiator handlerInstantiator)
-
Constructor Details
-
JsonAutowiringConfiguration
public JsonAutowiringConfiguration()
-
-
Method Details
-
objectMapperBuilder
@Bean public org.springframework.http.converter.json.Jackson2ObjectMapperBuilder objectMapperBuilder(com.fasterxml.jackson.databind.cfg.HandlerInstantiator handlerInstantiator) - Returns:
- the Jackson2ObjectMapperBuilder that enables the
Autowired
annotation in Jackson deserialized objects.
-
handlerInstantiator
@Bean public com.fasterxml.jackson.databind.cfg.HandlerInstantiator handlerInstantiator(org.springframework.context.ApplicationContext applicationContext) - Returns:
- The HandlerInstantiator needed by the
objectMapperBuilder(HandlerInstantiator)
-