-
Feature Request
-
Resolution: Done
-
L3 - Default
-
None
Currently users have to write code in order to enable java 8 date/time types in Spin
The idea behind this feature request would be to provide spring boot auto configuration that did this - triggered by a maven dependency.
The exact configuration could then be done be done as (spring boot) yaml parameters.
For reference, this is what a user would do:
1 - add the maven dependency
<dependency> <groupId>org.camunda.spin</groupId> <artifactId>camunda-spin-dataformat-json-jackson</artifactId> <version>1.6.5</version> </dependency>
2 - register javatimemodule through a DataFormatConfigurator
@Component public class CamundaJacksonFormatConfigurator implements DataFormatConfigurator<JacksonJsonDataFormat> { @Override public Class<JacksonJsonDataFormat> getDataFormatClass() { return JacksonJsonDataFormat.class; } @Override public void configure(JacksonJsonDataFormat dataFormat) { final ObjectMapper mapper = dataFormat.getObjectMapper(); final JavaTimeModule javaTimeModule = new JavaTimeModule(); mapper.registerModule(javaTimeModule); } }
3 - create file entry in META-INF/services/org.camunda.spin.spi.DataFormatConfigurator in order to register component (CamundaJacksonFormatConfigurator )