package com.mortals.xhx;

import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.impl.LocalCacheServiceImpl;
import com.mortals.framework.springcloud.boot.BaseWebApplication;
import com.mortals.xhx.swing.SwingArea;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;

//@SpringBootApplication(scanBasePackages = {"com.mortals"},exclude= {DataSourceAutoConfiguration.class})
@SpringBootApplication(scanBasePackages = {"com.mortals"},exclude={DataSourceAutoConfiguration.class})
@ServletComponentScan("com.mortals")
//@ImportResource(locations = {"classpath:config/spring-config.xml"})
public class ManagerApplication extends BaseWebApplication {

    @Bean
    public ICacheService cacheService() {
        return new LocalCacheServiceImpl();
    }

    public static void main(String[] args) {
    /*    SpringApplication.run(ManagerApplication.class, args);*/

/*        SpringApplication.run(ManagerApplication.class, args);*/
        ApplicationContext ctx = new SpringApplicationBuilder(ManagerApplication.class)
                .headless(false).run(args);


    }



}
