package com.tzy;

import com.dtflys.forest.springboot.annotation.ForestScan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;


/**
 * 启动程序
 * 
 * @author tzy
 */
@SpringBootApplication(scanBasePackages = "com.tzy")
@ComponentScan(excludeFilters = {
        @ComponentScan.Filter(type = FilterType.REGEX,pattern = "com.tzy.framework.shiro.*"),
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceAutoConfiguration.class,SecurityAutoConfiguration.class})
})
@EnableAsync
@EnableCaching
@ForestScan(basePackages = "com.tzy.common.utils.http.forest")
@Slf4j
@EnableFeignClients(basePackages = "com.tzy.openfeign")
public class PoyiApplication {
    public static void main(String[] args) {
        SpringApplication.run(PoyiApplication.class, args);
        log.info("(♥◠‿◠)ﾉﾞ app启动成功   ლ(´ڡ`ლ)ﾞ");
    }
}