package com.mortals.xhx;

import com.mortals.framework.springcloud.boot.BaseWebApplication;
import com.mortals.xhx.exception.GlobalExceptionHandler;
import com.mortals.xhx.flowable.conf.AppDispatcherServletConfiguration;
import com.mortals.xhx.flowable.conf.ApplicationConfiguration;
import org.apache.commons.configuration.DatabaseConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

@Import(value={GlobalExceptionHandler.class,
        // 引入修改的配置
        ApplicationConfiguration.class,
        AppDispatcherServletConfiguration.class,
        // 引入 DatabaseConfiguration 表更新转换
        DatabaseConfiguration.class
        // 引入 DatabaseConfiguration 表更新转换
       //DatabaseAutoConfiguration.class
})
@EnableFeignClients
@ComponentScan(basePackages = {"com.mortals.*"})
@MapperScan("com.mortals.*.dao")
@SpringBootApplication(exclude={SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class})
@ImportResource(locations = { "classpath:config/spring-config.xml" })
public class FlowableApplication extends BaseWebApplication {

    public static void main(String[] args) {
        SpringApplication.run(FlowableApplication.class, args);
    }

}
