package com.zfire.mall.manager;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.zfire.mall.manager.utils.ApplicationContextUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

//定时器已废弃，请前往supply-job服务处理
@EnableScheduling
@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class})
@ServletComponentScan(basePackages = {"com.zfire.mall.manager"})
@EnableAsync
//@EnableFeignClients
//@EnableDiscoveryClient
@EnableCaching
@MapperScan(basePackages = {
        "com.zfire.mall.manager.plus.mapper",
        "com.zfire.mall.manager.commonmapper",
        "com.zfire.mall.manager.datasource.engin.mapper"
})
public class ManagerApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(ManagerApplication.class, args);
        ApplicationContextUtils.setApplicationContext(context);
    }

}
