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 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;

//@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);


    }



}
