January 2018
Intermediate to advanced
414 pages
10h 29m
English
Let's modify our application.yml to have some profiles defined:
spring: profiles: active: "development"service: message: text: "hello"---spring: profiles: "development"service: message: text: "hi"---spring: profiles: "production"service: message: text: "welcome"
First, using spring.profile.active, we define what is the current profile for our application, development. Then, we define the values for our configuration by default.
After the first ---, representing a new section in our configuration, we define the values that change from the default values on the development profile. We change the service.message.simple to be hi. In the next section of our yaml, we define the values for the production profile and we change ...
Read now
Unlock full access