<packaging>war</packaging>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
@SpringBootApplication(scanBasePackages = {"com.fly"})
public class SpringDemoApp extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(SpringDemoApp.class);
}
public static void main(String[] args){
SpringApplication.run(SpringDemoApp.class,args);
}
}