aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-12 10:40:53 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-12 10:40:53 -0700
commit62680cbdc4c26e9729aad3c768e5680b27b91e64 (patch)
treeb09904ad073b4e2811f9227f29dd743f980f9d04
parent69d634fb0723ca4dced2f15ea432b4eb59d11d8e (diff)
downloadtrackermap-server-62680cbdc4c26e9729aad3c768e5680b27b91e64.tar.gz
trackermap-server-62680cbdc4c26e9729aad3c768e5680b27b91e64.tar.bz2
trackermap-server-62680cbdc4c26e9729aad3c768e5680b27b91e64.zip
Revert JSR353 removal
-rw-r--r--build.gradle1
-rw-r--r--src/main/java/org/traccar/MainModule.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index 46227d1ff..8c196043a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -63,6 +63,7 @@ dependencies {
implementation "org.glassfish.jersey.inject:jersey-hk2:$jerseyVersion"
implementation "org.glassfish.hk2:guice-bridge:2.6.1" // same version as jersey-hk2
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jacksonVersion"
+ implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr353:$jacksonVersion"
implementation "org.liquibase:liquibase-core:4.7.0"
implementation "com.sun.mail:javax.mail:1.6.2"
implementation "org.jxls:jxls:2.4.7" // needs upgrade (wait for jexl 4)
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index 0b3275cfc..73fe0c460 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -17,6 +17,7 @@ package org.traccar;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr353.JSR353Module;
import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import com.google.inject.Provides;
@@ -98,6 +99,7 @@ public class MainModule extends AbstractModule {
if (config.getBoolean(Keys.WEB_SANITIZE)) {
objectMapper.registerModule(new SanitizerModule());
}
+ objectMapper.registerModule(new JSR353Module());
objectMapper.setConfig(objectMapper
.getSerializationConfig().without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS));
return objectMapper;