package com.sa.ibiz.demo.boot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.cache.annotation.EnableCaching;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.sa.ibiz.demo.config.liquibase.MasterProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import com.sa.ibiz.demo.workflow.config.FlowableConfiguration;

@Import(FlowableConfiguration.class)
@SpringBootApplication(exclude = {
 org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
	    org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration.class,
	    org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration.class,
		DruidDataSourceAutoConfigure.class,
	    org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class, 
	    org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration.class
	})
@ComponentScans({
@ComponentScan(basePackages = {"com.sa.ibiz.demo"}
				//,excludeFilters={@Filter(type=FilterType.REGEX,pattern="com.sa.ibiz.demo.mob.xxx.controller.xxxController")}

				),
})
@MapperScan("com.sa.ibiz.demo.*.mapper")
@EnableCaching
@EnableConfigurationProperties({MasterProperties.class})
public class MobMain extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplicationBuilder builder = new SpringApplicationBuilder(MobMain.class);
                builder.run(args) ;
	}

}