aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/configuration/TelegramConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/configuration/TelegramConfig.java')
-rw-r--r--src/main/java/com/juick/server/configuration/TelegramConfig.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/configuration/TelegramConfig.java b/src/main/java/com/juick/server/configuration/TelegramConfig.java
new file mode 100644
index 00000000..ebd1fd15
--- /dev/null
+++ b/src/main/java/com/juick/server/configuration/TelegramConfig.java
@@ -0,0 +1,15 @@
+package com.juick.server.configuration;
+
+import com.juick.server.TelegramBotManager;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ConditionalOnProperty(name = "telegram_token")
+public class TelegramConfig {
+ @Bean
+ public TelegramBotManager telegramBotManager() {
+ return new TelegramBotManager();
+ }
+}