From 7aaa3f9a29c280f01c677c918932620be45cdbd7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Nov 2018 21:38:27 +0300 Subject: Merge everything into single Spring Boot application --- .../com/juick/server/configuration/TelegramConfig.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/com/juick/server/configuration/TelegramConfig.java (limited to 'src/main/java/com/juick/server/configuration/TelegramConfig.java') 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(); + } +} -- cgit v1.2.3