package com.sptg.estate.biz;

import com.codingapi.txlcn.tc.config.EnableDistributedTransaction;
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.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * title: EstateApplication
 * package: com.sptg.estate.biz
 * description: 物业服务启动类
 *
 *
 *
 */
@Slf4j
@SpringBootApplication
@EnableHystrix
@EnableEurekaClient
@EnableScheduling
@EnableAsync
@EnableDistributedTransaction
@EnableFeignClients(basePackages = {
        "com.sptg.permissions.api.feigns",
        "com.sptg.device.api.feigns",
        "com.sptg.statistics.api.feigns",
        "com.sptg.pay.api.feigns"
})
@ComponentScan(value = {
        "com.sptg.estate.biz",
        "com.sptg.permissions.api.feigns",
        "com.sptg.device.api.feigns",
        "com.sptg.statistics.api.feigns",
        "com.sptg.pay.api.feigns"
})
//@EnableSwagger2
@EnableWebMvc
public class EstateApplication {
    public static void main(String[] args) {
        SpringApplication.run(EstateApplication.class,args);
        log.warn("启动完成");
    }

}
