aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-08-01 23:09:20 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-08-01 23:09:20 -0700
commit18eea3995305cab6dab641f7d3dfd11b9a5433be (patch)
tree53d17ad5ed2cbeea5d2837adc2b24c679e3ae870 /src/main/java/org/traccar/web/WebServer.java
parentc733bc9f91e55df204d1626f6a2f88183184b041 (diff)
downloadtrackermap-server-18eea3995305cab6dab641f7d3dfd11b9a5433be.tar.gz
trackermap-server-18eea3995305cab6dab641f7d3dfd11b9a5433be.tar.bz2
trackermap-server-18eea3995305cab6dab641f7d3dfd11b9a5433be.zip
Update reports API and add logging
Diffstat (limited to 'src/main/java/org/traccar/web/WebServer.java')
-rw-r--r--src/main/java/org/traccar/web/WebServer.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 12fa80d10..7f0ec53b6 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@ import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.traccar.api.DateParameterConverterProvider;
import org.traccar.config.Config;
import org.traccar.api.AsyncSocketServlet;
import org.traccar.api.CorsResponseFilter;
@@ -161,8 +162,9 @@ public class WebServer {
}
ResourceConfig resourceConfig = new ResourceConfig();
- resourceConfig.registerClasses(JacksonFeature.class, ObjectMapperProvider.class, ResourceErrorHandler.class);
- resourceConfig.registerClasses(SecurityRequestFilter.class, CorsResponseFilter.class);
+ resourceConfig.registerClasses(
+ JacksonFeature.class, ObjectMapperProvider.class, ResourceErrorHandler.class,
+ SecurityRequestFilter.class, CorsResponseFilter.class, DateParameterConverterProvider.class);
resourceConfig.packages(ServerResource.class.getPackage().getName());
servletHandler.addServlet(new ServletHolder(new ServletContainer(resourceConfig)), "/api/*");
}