In the local development environment, as we mentioned in Chapter 8, Creating the Application Scaffold - Taking off Like a Rocket, we can set the active profile to be dev by setting the environment variable, spring_profiles_active.
If you want to override the active profile, for example, by changing it to be production, you can pass a command line argument when you start the application, as shown in the following:
java -jar -Dspring.profiles.active=production app.jar
Or, when using the mvn command, as follows:
mvn spring-boot:run -Dspring-boot.run.profiles=production