package ${basePackage};

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
<#if project.needMoreDB>
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
</#if>
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import ${basePackage}.frame.auth.LocalData;

@SpringBootApplication
<#if project.needMoreDB>
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
<#else>
@EnableAutoConfiguration
</#if>
public class Application extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Application.class);
    }

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