Spring Boot 4 · Configuration

Set a profile with an environment variable

Environment variables override properties, which suits containers.

SPRING_PROFILES_ACTIVE=prod java -jar app.jar

Official Spring Boot 4 documentation

More configuration commands

All configuration commands · Spring Boot 4 cheatsheet

Was this page helpful?