Posts

Showing posts with the label Maven

Deploy Spring Boot application on Tomcat

Deploy Spring Boot application on Tomcat Step #1 Add the following dependency to pom.xml in order to tell Spring Boot not to use its embedded Tomcat. < dependency >      < groupId > org . springframework . boot < / groupId >      < artifactId > spring - boot - starter - tomcat < / artifactId >      < scope > provided < / scope > < / dependency > Step #2 Change the packaging property to war in pom.xml. < properties >        < packaging > war < / packaging > < / properties > Step #3 Replace your initializer class with the following: package com.oms; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServ...