Skip to content

Commit

Permalink
feat: add ObjectMapper configuration for async event handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresFelipe11 committed Jan 7, 2025
1 parent 6ae5e30 commit 506e4b7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"files": {
"entry-point/async-event-handler/handler-registry-configuration.java.mustache": "infrastructure/entry-points/async-event-handler/src/main/java/{{packagePath}}/events/HandlerRegistryConfiguration.java",
"entry-point/async-event-handler/object-mapper-config.java.mustache": "infrastructure/entry-points/async-event-handler/src/main/java/{{packagePath}}/events/ObjectMapperConfig.java",
"entry-point/async-event-handler/events-handler.java.mustache": "infrastructure/entry-points/async-event-handler/src/main/java/{{packagePath}}/events/handlers/EventsHandler.java",
"entry-point/async-event-handler/commands-handler.java.mustache": "infrastructure/entry-points/async-event-handler/src/main/java/{{packagePath}}/events/handlers/CommandsHandler.java",
"entry-point/async-event-handler/queries-handler.java.mustache": "infrastructure/entry-points/async-event-handler/src/main/java/{{packagePath}}/events/handlers/QueriesHandler.java",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{#eda}}
package co.com.bancolombia.events;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.reactivecommons.async.commons.converters.json.ObjectMapperSupplier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ObjectMapperConfig {
@Bean
public ObjectMapper objectMapper(ObjectMapperSupplier supplier) {
return supplier.get();
}
}
{{/eda}}
{{^eda}}
// This configuration is only available when 'eda' is enabled
// package co.com.bancolombia.events;
//
// import com.fasterxml.jackson.databind.ObjectMapper;
// import org.reactivecommons.async.commons.converters.json.ObjectMapperSupplier;
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
//
// @Configuration
// public class ObjectMapperConfig {
//
// @Bean
// public ObjectMapper objectMapper(ObjectMapperSupplier supplier) {
// return supplier.get();
// }
// }
{{/eda}}

0 comments on commit 506e4b7

Please sign in to comment.