package ${domain};

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
<#if project.frameValue() &gt; 0>
import ${domain}.frame.auth.LocalData;
<#if project.needMoreDB>
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
</#if>
</#if>

@SpringBootApplication
<#if project.frameValue() &gt; 0 && 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) {
<#if project.frameValue() &gt; 0>
        LocalData.setApplicationContext(SpringApplication.run(Application.class, args));
<#else>
        SpringApplication.run(Application.class, args);
</#if>
    }
}