Bird
0
0

Which of the following is the correct way to activate a profile named dev in application.properties?

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

Which of the following is the correct way to activate a profile named dev in application.properties?

Aprofiles.active=dev
Bspring.profiles.active=dev
Cspring.active.profile=dev
Dspring.profile=dev
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct property key

    The correct property to activate profiles is spring.profiles.active.
  2. Step 2: Compare options

    Only spring.profiles.active=dev uses the exact correct key and value format.
  3. Final Answer:

    spring.profiles.active=dev -> Option B
  4. Quick Check:

    Activate profile with spring.profiles.active [OK]
Quick Trick: Use spring.profiles.active to set active profile [OK]
Common Mistakes:
  • Using spring.active.profile instead
  • Omitting 'spring' prefix
  • Using singular 'profile' instead of 'profiles'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes