The dev profile

In the local development environment, as we mentioned in Chapter 8Creating 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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.129.253