aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/notification')
-rw-r--r--src/main/java/org/traccar/notification/NotificationFormatter.java2
-rw-r--r--src/main/java/org/traccar/notification/TextTemplateFormatter.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationFormatter.java b/src/main/java/org/traccar/notification/NotificationFormatter.java
index fa244d9b4..9ee3b97b6 100644
--- a/src/main/java/org/traccar/notification/NotificationFormatter.java
+++ b/src/main/java/org/traccar/notification/NotificationFormatter.java
@@ -28,7 +28,9 @@ import org.traccar.model.User;
import org.traccar.session.cache.CacheManager;
import javax.inject.Inject;
+import javax.inject.Singleton;
+@Singleton
public class NotificationFormatter {
private final CacheManager cacheManager;
diff --git a/src/main/java/org/traccar/notification/TextTemplateFormatter.java b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
index be894af96..444f4a7c2 100644
--- a/src/main/java/org/traccar/notification/TextTemplateFormatter.java
+++ b/src/main/java/org/traccar/notification/TextTemplateFormatter.java
@@ -30,6 +30,7 @@ import org.traccar.model.User;
import org.traccar.storage.StorageException;
import javax.inject.Inject;
+import javax.inject.Singleton;
import java.io.IOException;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
@@ -37,6 +38,7 @@ import java.nio.file.Paths;
import java.security.GeneralSecurityException;
import java.util.Locale;
+@Singleton
public class TextTemplateFormatter {
private static final Logger LOGGER = LoggerFactory.getLogger(TextTemplateFormatter.class);