package com.gree.mall.miniapp;

import com.gree.mall.miniapp.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.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

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

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

}
