- Option 1: Java System Properties (VM Arguments):
java -jar -Dspring.profiles.active=local application.jar
- Option 2: Program arguments:
java -jar application.jar --spring.profiles.active=prod --spring.config.location=./config
- Option 2b: Program arguments for GitHub sample:
java -jar application.jar --spring.profiles.active=sample
The Secure Connect is in the secure-connect
directory.
After build with gradle assemble
the build jar (secure-connect-shell.jar
) can be run.
Only parameter is the config file to be used. Either as absolut path or as filename which can resolved by the classloader.
- As sample start with
java -jar build/libs/secure-connect-shell.jar --config=/path/to/config.yaml
For further reference, please consider the following sections:
- Official Gradle documentation
- Kotlin documentation
- Spring Shell Reference Documentation
- CLI with Spring Shell by Baeldung
- Pass arguments to CLI
These additional references should also help you: