package com.hotent.assembly;

import org.mybatis.spring.annotation.MapperScan;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.boot.SpringApplication;
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.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.scheduling.annotation.EnableAsync;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.hotent.base.annotation.IgnoreOnAssembly;
import com.hotent.base.typefilter.CustomTypeFilter;

@SpringBootApplication(exclude= {DruidDataSourceAutoConfigure.class, RedissonAutoConfiguration.class})
@Configuration
@EnableAsync
@MapperScan(basePackages={"com.hotent.**.dao"})
@ComponentScan(basePackages={"com.hotent.*","org.activiti.engine.*"},
excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = {IgnoreOnAssembly.class}),
		@ComponentScan.Filter(type = FilterType.CUSTOM, value = {CustomTypeFilter.class})})
@EnableFeignClients(basePackages = {"com.hotent.*"})
public class Application
{
	public static void main( String[] args )
	{
		SpringApplication.run(Application.class, args);
	}
}
//打war包用
//public class Application extends SpringBootServletInitializer
//{
//	public static void main(String[] args) {
//		SpringApplication.run(Application.class,args);
//	}
//
//	@Override
//	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//		return builder.sources(Application.class);
//	}
//}
