Posts

Showing posts with the label Spring boot application to Jboss server

How to deploy Spring boot application to JBOSS application server

How to deploy Spring boot application to JBOSS application server Create a spring boot application Open pom.xml and add the below dependency. As you see we added spring-boot-starter-tomcat and set the scope to provided. This is to compile web related components. Make sure the packaging is WAR. <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> </dependencies> <!-- Make sure that you changed the packaging to war --> <packaging>war</packaging> Extend SpringBootServletInitializer class in your Spring boot main class and override the configure method. @SpringBootApplication @EnableSwagger2 public class SpringBootDemoApplication extends SpringBootServletInitializer {   @Override   protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){     return builder.so...