package com.gree.mall.manager;

import com.gree.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.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@ServletComponentScan(basePackages = {"com.gree.mall.manager"})
@EnableAsync
@EnableScheduling
//@EnableFeignClients
@EnableDiscoveryClient
@EnableCaching
@MapperScan(basePackages = {
        "com.gree.mall.manager.plus.mapper",
        "com.gree.mall.manager.commonmapper"
})
public class ManagerApplication {

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

}
