This is a starter pom for a spring boot application with the TelegramBots Java API.
First, you need to add jitpack as a repository to your pom of your spring boot app
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Then you have to add the following dependency to the pom
<dependency>
<groupId>com.github.xabgesagtx</groupId>
<artifactId>telegram-spring-boot-starter</artifactId>
<version>0.12</version>
</dependency>
The only thing you need to do now is to create a bean for a bot. E.g.:
@Component
public class Bot extends TelegramLongPollingBot {
...
}
The bot will then be registered for you automatically on startup.
An implementation example is available too.