package net.northking.cctp.dw;

import cn.gjing.tools.auth.config.EnableAuthorization;
import net.northking.cctp.common.config.EnableNKCloud;
import net.northking.cctp.common.config.EnableNKWebMvc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableDiscoveryClient
@EnableNKCloud
@MapperScan({"net.northking.cctp.dw.db.mapper", "net.northking.cctp.dw.db.dao"})
@EnableNKWebMvc
@EnableCaching
@EnableScheduling
@EnableAsync
@EnableAuthorization
@EnableTransactionManagement // 开启事务
@EnableFeignClients(basePackages = {"net.northking.cctp.dw.feign", "net.northking.cctp.common.feign", "com.hzbank.testteam.autotest"})
@ComponentScan(basePackages = {"net.northking.cctp.dw","com.hzbank.testteam.autotest"})
public class CCTPDwApplication {
    private static final Logger logger = LoggerFactory.getLogger(CCTPDwApplication.class);

    public static void main(String[] args)
    {
        logger.info("微服务启动----开始 .................");
        ConfigurableApplicationContext ctx = SpringApplication.run(CCTPDwApplication.class, args);
        logger.info("微服务启动----完成 .................");
    }
}
