Bird
0
0

Consider the following application.properties snippet:

medium📝 state output Q4 of 15
Spring Boot - Application Configuration
Consider the following application.properties snippet:
spring.mail.host=smtp.mailtrap.io
spring.mail.port=2525
spring.mail.username=admin
spring.mail.password=secret

What value will be retrieved for spring.mail.password when accessed in the application?
Aadmin
Bsecret
Csmtp.mailtrap.io
D2525
Step-by-Step Solution
Solution:
  1. Step 1: Identify the property key

    The key in question is spring.mail.password.
  2. Step 2: Locate the value in the snippet

    From the snippet, spring.mail.password=secret assigns the value secret to this key.
  3. Final Answer:

    secret -> Option B
  4. Quick Check:

    Property keys map directly to their assigned values in application.properties. [OK]
Quick Trick: Property keys map directly to their assigned values [OK]
Common Mistakes:
  • Confusing username with password value
  • Mixing up host or port values with password
  • Assuming default values instead of specified ones

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes