Bird
0
0

Which of the following is the correct way to name a Spring Boot properties file for a profile named dev?

easy📝 Syntax Q12 of 15
Spring Boot - Application Configuration
Which of the following is the correct way to name a Spring Boot properties file for a profile named dev?
Aapplication-dev.properties
Bapplication.properties-dev
Cdev-application.properties
Dapplication_dev.properties
Step-by-Step Solution
Solution:
  1. Step 1: Recall Spring Boot profile file naming

    Spring Boot expects profile-specific files named as application-{profile}.properties.
  2. Step 2: Match the correct pattern

    For profile 'dev', the file should be application-dev.properties.
  3. Final Answer:

    application-dev.properties -> Option A
  4. Quick Check:

    Profile file = application-{profile}.properties [OK]
Quick Trick: Profile files use dash between application and profile [OK]
Common Mistakes:
  • Using underscore instead of dash
  • Placing profile after .properties
  • Starting filename with profile name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes