package com.lanyuanxiaoyao.service.command;

import com.lanyuanxiaoyao.service.configuration.SecurityConfig;
import com.lanyuanxiaoyao.service.forest.configuration.SpringCloudDiscoveryInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * 命令行工具入口
 *
 * @author ZhangJiacheng
 * @date 2022-03-24
 */
@SpringBootApplication
@EnableConfigurationProperties
@ComponentScan(
        basePackages = {"com.lanyuanxiaoyao.service"},
        excludeFilters = {
                @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
                        SpringCloudDiscoveryInterceptor.class,
                        SecurityConfig.class
                }),
        }
)
public class CommandApplication implements ApplicationRunner {
    private static final Logger logger = LoggerFactory.getLogger(CommandApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(CommandApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        // Test
    }
}
