package com.usoftchina.bi.server;

import com.usoftchina.bi.core.jdbc.DynamicDataSourceRegister;
import com.usoftchina.bi.core.utils.ContextUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableSwagger2
@Import({DynamicDataSourceRegister.class})
@EnableScheduling
@ComponentScan("com.usoftchina.bi")
@EnableCaching
public class Application {

    public static void main(String[] args) {
        ApplicationContext app = SpringApplication.run(Application.class, args);
        ContextUtil.setApplicationContext(app);
    }
}
