【文件属性】:
文件名称:telegram-spring-boot-starter:Telegram Bot API Spring Boot Starter
文件大小:17KB
文件格式:ZIP
更新时间:2021-01-30 06:05:08
spring spring-boot telegram telegram-bot spring-boot-starter
电报Spring Boot Starter
这是使用的Spring启动应用程序的入门pom。
启动器在Maven Central可用。 只需将以下依赖项添加到pom中:
< dependency>
< groupId>com.github.xabgesagtx groupId>
< artifactId>telegram-spring-boot-starter artifactId>
< version>0.24 version>
dependency>
对于gradle用户,只需将其添加到您的依赖项中即可:
compile( ' com.github.xabgesagtx:telegram-spring-boot-starter:0.24 ' )
添加依赖项后,您唯一需要做的就是为机器人创建一个bean。 例如:
@Component
public class Bot extends TelegramLongPollingBot {
...
}
或对于Webhook机器人:
@Component
public class Bo