Showcasing configuration features of Spring Boot and the Spring Framework like Spring Profiles.
Follow these instructions to build and run the example program.
- Pre-requisite: Java
- I used Java 21
- Build the program distribution:
-
./gradlew installDist
-
- Run the program:
-
./build/install/config/bin/config
-
- Alternatively, enable a Spring Boot profile named "day" and run the program:
-
SPRING_PROFILES_ACTIVE=day ./build/install/config/bin/config
- Notice how the fortune messages have changed.
-
- Try the "dynamic" profile too:
-
SPRING_PROFILES_ACTIVE=dynamic ./build/install/config/bin/config
-