aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/configuration/TelegramConfig.java
blob: ebd1fd15161548190725b103f73909796cf85c07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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();
    }
}