package com.sptg.permissions.biz;

import com.sptg.device.api.stream.DeviceUpdateProduceInterface;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.context.annotation.ComponentScan;

import com.codingapi.txlcn.tc.config.EnableDistributedTransaction;
import com.sptg.permissions.biz.stream.AccountDisableProduceInterface;
import com.sptg.permissions.biz.stream.SyncAccountProduceInterface;

/**
 * title: PermissionsApplication
 * package: com.sptg.permissions.biz
 * description: 权限模块启动类
 *
 *
 *
 */
@Slf4j
@SpringCloudApplication
@EnableCaching
@EnableDistributedTransaction
@EnableEurekaClient
@EnableFeignClients(basePackages = {
        "com.sptg.device.api.feigns",
        "com.sptg.estate.api.feigns",
        "com.sptg.third.api.feigns"
})
@ComponentScan(basePackages = {
        "com.sptg.permissions.biz",
        "com.sptg.device.api.feigns",
        "com.sptg.estate.api.feigns",
        "com.sptg.third.api.feigns"
})
@EnableBinding(value = { SyncAccountProduceInterface.class, AccountDisableProduceInterface.class, DeviceUpdateProduceInterface.class})
public class PermissionsApplication {

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