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
Serving Locally Stored Images in Spring Boot Applications
Approach 1: Programmatic File Streaming via Controller
When image are stored outside the web root or require access control, streaming the file through a dedicated endpoint is the standard approach. The frontend requests the image via a query parameter, and the backend reads the file from disk and pipes it directly to the HTTP response.
Fronten ...
Posted on Thu, 07 May 2026 22:53:37 +0000 by june_c21