I have followed these steps to convert the pacakging from Jar to War.
But when i check my project folder or the build folder that is generated there is no war file generated only a war folder comes with MANIFEST.MF file
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-gradle-packaging
The changes i did in my gradle build file
apply plugin: 'war'
configurations {
providedRuntime
}
dependencies {
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
}
Added a new ServletInitializer class
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(DemoApplication.class);
}
}