package com.sptg.ad.biz;

import com.sptg.ad.api.stream.AdvertTaskCallbackProduceInterface;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * title: AdApplication
 * package: com.sptg.ad.biz
 * description: 广告服务启动类
 *
 *                  
 *                 
 */
@Slf4j
@SpringBootApplication
@EnableEurekaClient
@EnableHystrix
@EnableScheduling
@EnableFeignClients(basePackages = {
        "com.sptg.device.api.feigns",
        "com.sptg.permissions.api.feigns",
        "com.sptg.statistics.api.feigns"
})
@ComponentScan(basePackages = {
        "com.sptg.ad.biz",
        "com.sptg.device.api.feigns",
        "com.sptg.permissions.api.feigns",
        "com.sptg.statistics.api.feigns"
})
@EnableBinding(value = AdvertTaskCallbackProduceInterface.class)
public class AdApplication {

    public static void main(String[] args) {
        SpringApplication.run(AdApplication.class,args);
        log.warn("启动完成");
    }

}
