package com.kiisoo.ic.app;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@ComponentScan("com.kiisoo.ic")
@EnableScheduling
@MapperScan({"com.kiisoo.ic.*.*.mapper,com.kiisoo.ic.*.mapper"})
@Slf4j
public class IcApplication extends SpringBootServletInitializer {

    /**
     * 实现SpringBootServletInitializer
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        builder.sources(this.getClass());
        return super.configure(builder);
    }

    public static void main(String[] args) {
        SpringApplication.run(IcApplication.class, args);
        log.info("\n----------------------------------------------------------------------------------------------\n"
                + "-------------------------------------------启动完毕--------------------------------------------\n"
                + "-----------------------------------------------------------------------------------------------");
    }

}
