diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-09 17:09:52 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-09 17:09:52 -0700 |
commit | 29b5d05cfd66a9f51b7ce272c1fb07077bc715b2 (patch) | |
tree | f9e4df6f47fd3723fe972893ca34273aa9979432 /src/main/java/org/traccar/MainModule.java | |
parent | 5b6bba55d960dcf4fc7721d1d2e75b950bb13809 (diff) | |
download | trackermap-server-29b5d05cfd66a9f51b7ce272c1fb07077bc715b2.tar.gz trackermap-server-29b5d05cfd66a9f51b7ce272c1fb07077bc715b2.tar.bz2 trackermap-server-29b5d05cfd66a9f51b7ce272c1fb07077bc715b2.zip |
Remove WebServer from context
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index d070c9fd7..9ec73d819 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -61,6 +61,7 @@ import org.traccar.sms.SmsManager; import org.traccar.speedlimit.OverpassSpeedLimitProvider; import org.traccar.speedlimit.SpeedLimitProvider; import org.traccar.storage.Storage; +import org.traccar.web.WebServer; import javax.annotation.Nullable; import javax.inject.Singleton; @@ -128,6 +129,14 @@ public class MainModule extends AbstractModule { return null; } + @Provides + public static WebServer provideWebServer(Config config) { + if (config.hasKey(Keys.WEB_PORT)) { + return new WebServer(config); + } + return null; + } + @Singleton @Provides public static Geocoder provideGeocoder(Config config) { |