package com.hzya.frame;

import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceCreatorAutoConfiguration;
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.druid.DruidDynamicDataSourceConfiguration;
import com.hzya.frame.DataSource.impl.DynamicDataSourceAssistConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

@EnableCaching
@ServletComponentScan(basePackages = {"com.hzya.frame" ,"org.jeecg.modules.jmreport","com.jimureport.demo"})
@ImportResource(locations = {"classpath:cfgHome/**/spring/spring-*.xml"})
@Import({DruidDynamicDataSourceConfiguration.class, DynamicDataSourceCreatorAutoConfiguration.class, DynamicDataSourceAssistConfiguration.class})

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, FlywayAutoConfiguration.class})
public class WebappApplication {

    public static void main(String[] args) {
        SpringApplication.run(WebappApplication.class, args);
        System.out.println("                             (♥◠‿◠)ﾉﾞ  启动成功   ლ(´ڡ`ლ)ﾞ  \n" +
                " .----------------.  .----------------.  .-----------------. .----------------.  .-----------------.\n" +
                "| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |\n" +
                "| |  ____  ____  | || |     ____     | || | ____  _____  | || |      __      | || | ____  _____  | |\n" +
                "| | |_  _||_  _| | || |   .'    `.   | || ||_   \\|_   _| | || |     /  \\     | || ||_   \\|_   _| | |\n" +
                "| |   \\ \\  / /   | || |  /  .--.  \\  | || |  |   \\ | |   | || |    / /\\ \\    | || |  |   \\ | |   | |\n" +
                "| |    \\ \\/ /    | || |  | |    | |  | || |  | |\\ \\| |   | || |   / ____ \\   | || |  | |\\ \\| |   | |\n" +
                "| |    _|  |_    | || |  \\  `--'  /  | || | _| |_\\   |_  | || | _/ /    \\ \\_ | || | _| |_\\   |_  | |\n" +
                "| |   |______|   | || |   `.____.'   | || ||_____|\\____| | || ||____|  |____|| || ||_____|\\____| | |\n" +
                "| |              | || |              | || |              | || |              | || |              | |\n" +
                "| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |\n" +
                " '----------------'  '----------------'  '----------------'  '----------------'  '----------------' ");
    }


}
