Question 1
BeginnerConfiguration and Dependency Injection · Configuration Profiles
You are developing a Quarkus microservice that requires different database configurations for development, testing, and production environments. You want to define a property db.url that changes automatically based on the active profile. Which of the following entries in application.properties correctly sets the value for the 'production' profile specifically?
Answer and explanation
Correct answer: B
In Quarkus, profile-specific properties are defined using the syntax %profile.property-key=value. Therefore, %prod.db.url is the correct syntax to target the 'prod' profile. The prefix prod. without the percent sign is interpreted as part of the property name, not a profile selector.
