Deploying a Spring Boot Application as a WAR on Tomcat
By default, Spring Boot applications are packaged as executable JARs with an embedded Tomcat server. While convenient for development and microservices, this approach has limitations in certain scenarios—particularly when dealing with file uploads that need to persist acrross application restarts. Since the embedded server starts fresh each tim ...
Posted on Wed, 17 Jun 2026 16:25:46 +0000 by dstockto
Spring Boot Static Resource Configuration and Deployment Packaging
Static Resource Configuration
Configure static resource locations in application.yml:
spring:
resources:
static-locations: classpath:/static/
WAR Package Deployment
To package as WAR file, update pom.xml packaging type:
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<group ...
Posted on Sun, 10 May 2026 16:32:22 +0000 by Noctule