aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 13:49:43 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-01 13:49:43 +1300
commit40a607faa34d3c21d7b6d8275279fc8ce3c96980 (patch)
treeb2752bb57016bf8eb9b44b21af9cf72dbd30eb1a /src/org/traccar/web
parentb175699d497967a9105425bf288d833ce96973e2 (diff)
downloadtrackermap-server-40a607faa34d3c21d7b6d8275279fc8ce3c96980.tar.gz
trackermap-server-40a607faa34d3c21d7b6d8275279fc8ce3c96980.tar.bz2
trackermap-server-40a607faa34d3c21d7b6d8275279fc8ce3c96980.zip
Explicitly register resource classes
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/WebServer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index 5ea31b079..317e4db46 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -29,6 +29,8 @@ import org.glassfish.jersey.servlet.ServletContainer;
import org.traccar.Config;
import org.traccar.api.CorsResponseFilter;
import org.traccar.api.SecurityRequestFilter;
+import org.traccar.api.resource.DeviceResource;
+import org.traccar.api.resource.UserResource;
import org.traccar.helper.Log;
/**
@@ -132,9 +134,9 @@ public class WebServer {
private void initRestApi() {
ResourceConfig resourceConfig = new ResourceConfig();
- resourceConfig.packages("org.traccar.api");
resourceConfig.register(SecurityRequestFilter.class);
resourceConfig.register(CorsResponseFilter.class);
+ resourceConfig.registerClasses(DeviceResource.class, UserResource.class);
ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig));
servletHandler.addServlet(servletHolder, "/rest/*");