Bird
0
0

Which of the following is the correct way to define a profile-specific properties file for the prod profile?

easy📝 Syntax Q3 of 15
Spring Boot - Docker and Deployment

Which of the following is the correct way to define a profile-specific properties file for the prod profile?

Aprod-application.properties
Bapplication-prod.properties
Capplication.properties.prod
Dapplication.properties-prod
Step-by-Step Solution
Solution:
  1. Step 1: Recall Spring Boot naming conventions for profile files

    Profile-specific files use the format 'application-{profile}.properties'.
  2. Step 2: Identify the correct filename for 'prod'

    The correct filename is 'application-prod.properties'.
  3. Final Answer:

    application-prod.properties -> Option B
  4. Quick Check:

    Profile file format = application-{profile}.properties [OK]
Quick Trick: Use application-{profile}.properties for profile configs [OK]
Common Mistakes:
  • Placing profile after .properties extension
  • Using incorrect file name order
  • Adding extra dashes or prefixes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes