org.khasanof.FluentStarterAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-fluent Show documentation
Show all versions of spring-boot-starter-fluent Show documentation
Fluent - Easy Telegram Bots with Spring
The newest version!
package org.khasanof;
import org.khasanof.config.FluentProperties;
import org.khasanof.service.bot.TelegramBotRegistryService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.AutoConfigurationExcludeFilter;
import org.springframework.boot.context.TypeExcludeFilter;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import static org.khasanof.constants.FluentConstants.BASE_PACKAGE;
/**
* Author: Nurislom
*
* Date: 18.06.2023
*
* Time: 11:21
*
* Package: org.khasanof.main
*/
@EnableConfigurationProperties(value = {FluentProperties.class})
@ComponentScan(excludeFilters = { @ComponentScan.Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
@ComponentScan.Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) }, basePackages = {BASE_PACKAGE})
public class FluentStarterAutoConfiguration {
/**
*
* @param botRegistryService
* @return
*/
@Bean
CommandLineRunner getRunner(TelegramBotRegistryService botRegistryService) {
return args -> botRegistryService.registry();
}
}