Добавил переменные для прокси
This commit is contained in:
parent
ba0388e9fd
commit
34c3370483
@ -1,17 +0,0 @@
|
|||||||
package dev.struchkov.bot.gitlab.core.config.properties;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Component
|
|
||||||
@ConfigurationProperties(prefix = "bitbucketbot.init")
|
|
||||||
public class InitProperty {
|
|
||||||
|
|
||||||
private Long startCommentId;
|
|
||||||
private boolean use = false;
|
|
||||||
|
|
||||||
}
|
|
@ -19,6 +19,14 @@ spring:
|
|||||||
telegram-config:
|
telegram-config:
|
||||||
bot-username: ${TELEGRAM_BOT_USERNAME}
|
bot-username: ${TELEGRAM_BOT_USERNAME}
|
||||||
bot-token: ${TELEGRAM_BOT_TOKEN}
|
bot-token: ${TELEGRAM_BOT_TOKEN}
|
||||||
|
proxy-config:
|
||||||
|
enable: ${PROXY_ENABLE:false}
|
||||||
|
host: ${PROXY_HOST:host}
|
||||||
|
port: ${PROXY_PORT:8080}
|
||||||
|
type: ${PROXY_TYPE:SOCKS5}
|
||||||
|
user: ${PROXY_USERNAME:}
|
||||||
|
password: ${PROXY_PASSWORD:}
|
||||||
|
|
||||||
gitlab-bot:
|
gitlab-bot:
|
||||||
version: 0.0.7 Beta
|
version: 0.0.7 Beta
|
||||||
person:
|
person:
|
||||||
|
2
pom.xml
2
pom.xml
@ -44,7 +44,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
<godfather.telegram.core.version>0.0.41</godfather.telegram.core.version>
|
<godfather.telegram.core.version>0.0.42</godfather.telegram.core.version>
|
||||||
|
|
||||||
<javax.persistance.version>2.2</javax.persistance.version>
|
<javax.persistance.version>2.2</javax.persistance.version>
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import dev.struchkov.godfather.simple.core.service.UnitPointerServiceImpl;
|
|||||||
import dev.struchkov.godfather.simple.data.repository.impl.PersonSettingLocalRepository;
|
import dev.struchkov.godfather.simple.data.repository.impl.PersonSettingLocalRepository;
|
||||||
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapRepository;
|
import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapRepository;
|
||||||
import dev.struchkov.godfather.simple.data.repository.impl.UnitPointLocalRepository;
|
import dev.struchkov.godfather.simple.data.repository.impl.UnitPointLocalRepository;
|
||||||
|
import dev.struchkov.godfather.telegram.domain.config.ProxyConfig;
|
||||||
import dev.struchkov.godfather.telegram.domain.config.TelegramConnectConfig;
|
import dev.struchkov.godfather.telegram.domain.config.TelegramConnectConfig;
|
||||||
import dev.struchkov.godfather.telegram.main.context.TelegramConnect;
|
import dev.struchkov.godfather.telegram.main.context.TelegramConnect;
|
||||||
import dev.struchkov.godfather.telegram.simple.consumer.EventDistributorService;
|
import dev.struchkov.godfather.telegram.simple.consumer.EventDistributorService;
|
||||||
@ -24,6 +25,7 @@ import dev.struchkov.godfather.telegram.simple.core.MailAutoresponderTelegram;
|
|||||||
import dev.struchkov.godfather.telegram.simple.core.TelegramConnectBot;
|
import dev.struchkov.godfather.telegram.simple.core.TelegramConnectBot;
|
||||||
import dev.struchkov.godfather.telegram.simple.core.service.SenderMapRepository;
|
import dev.struchkov.godfather.telegram.simple.core.service.SenderMapRepository;
|
||||||
import dev.struchkov.godfather.telegram.simple.sender.TelegramSender;
|
import dev.struchkov.godfather.telegram.simple.sender.TelegramSender;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -93,6 +95,13 @@ public class TelegramBotConfig {
|
|||||||
return new TelegramConnectBot(telegramConfig);
|
return new TelegramConnectBot(telegramConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConfigurationProperties("telegram-proxy-config")
|
||||||
|
@ConditionalOnProperty(prefix = "telegram-config.proxy-config.enable", value = "true")
|
||||||
|
public ProxyConfig proxyConfig() {
|
||||||
|
return new ProxyConfig();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConfigurationProperties("telegram-config")
|
@ConfigurationProperties("telegram-config")
|
||||||
public TelegramConnectConfig telegramConfig() {
|
public TelegramConnectConfig telegramConfig() {
|
||||||
|
Loading…
Reference in New Issue
Block a user