package com.juick.api.configuration; import com.juick.api.TGBot; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * Created by vital on 28.03.2017. */ @Configuration public class TelegramConfiguration { @Value("${telegram_token}") private String telegramToken; @Bean public TGBot tgBot() { return new TGBot(telegramToken); } }