aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
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/*");