Setting active profile and config location from command line in spring boot

To set the active profile and the configuration location from the command line in Spring Boot, you can use the and properties.

Here's an example of how you can set these properties when running a Spring Boot application:

java -jar myapp.jar

You can also set these properties using environment variables or by using the spring.config.additional-location property to specify additional configuration locations.

For example:

java -jar myapp.jar --spring.config.additional-location=file:/etc/myapp/