fjtirado commented on code in PR #2122:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/2122#discussion_r1814706702
##########
data-audit/data-audit-common-service/src/main/java/org/kie/kogito/app/audit/json/JsonUtils.java:
##########
@@ -41,15 +38,7 @@ public static ObjectMapper getObjectMapper() {
}
public static ObjectMapper configure(ObjectMapper objectMapper) {
-
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
- objectMapper.registerModule(JsonFormat.getCloudEventJacksonModule());
- objectMapper.registerModule(new JavaTimeModule());
-
- SimpleModule module = new SimpleModule("Kogito Cloud Events");
- module.addDeserializer(ProcessInstanceDataEvent.class, new
JsonProcessInstanceDataEventDeserializer());
- module.addDeserializer(UserTaskInstanceDataEvent.class, new
JsonUserTaskInstanceDataEventDeserializer());
- module.addDeserializer(JobInstanceDataEvent.class, new
JsonJobDataEventDeserializer());
- objectMapper.registerModule(module);
- return objectMapper;
+ return
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
false).registerModule(JsonFormat.getCloudEventJacksonModule())
+ .registerModule(new SimpleModule("Data
Audit").addDeserializer(JobInstanceDataEvent.class, new
JsonJobDataEventDeserializer())).findAndRegisterModules();
Review Comment:
findAndRegisterModules() automatically register all modules found in
classpath
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]