Skip to content

Commit

Permalink
try registering JodaModule to allow time conversion via Jackson
Browse files Browse the repository at this point in the history
  • Loading branch information
FieteO committed Mar 19, 2024
1 parent c3df207 commit b0405ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import javax.servlet.FilterRegistration;

import com.codahale.metrics.InstrumentedScheduledExecutorService;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
Expand Down Expand Up @@ -127,7 +128,7 @@ public AppContext getContext() {
public void initialize(Bootstrap<ReaperApplicationConfiguration> bootstrap) {
bootstrap.addCommand(new ReaperDbMigrationCommand("schema-migration", "Performs database schema migrations"));
bootstrap.addBundle(new AssetsBundle("/assets/", "/webui", "index.html"));
bootstrap.getObjectMapper().registerModule(new JavaTimeModule());
bootstrap.getObjectMapper().registerModule(new JavaTimeModule()).registerModule(new JodaModule());

// enable using environment variables in yml files
final SubstitutingSourceProvider envSourceProvider = new SubstitutingSourceProvider(
Expand Down

0 comments on commit b0405ba

Please sign in to comment.