Bird
0
0

Which line in application.properties below will cause a syntax error?

medium📝 Debug Q6 of 15
Spring Boot - Application Configuration
Which line in application.properties below will cause a syntax error?
spring.application.name=DemoApp
spring.application-version=1.0
spring.application.port=8080
Aspring.application-version=1.0
Bspring.application.name=DemoApp
Cspring.application.port=8080
DNone of the above
Step-by-Step Solution
Solution:
  1. Step 1: Check property key syntax rules

    Keys must use dots to separate words, dashes are not valid separators.
  2. Step 2: Identify invalid key

    spring.application-version uses a dash, which is invalid syntax.
  3. Final Answer:

    spring.application-version=1.0 -> Option A
  4. Quick Check:

    Property keys use dots, not dashes [OK]
Quick Trick: Use dots, not dashes, in property keys [OK]
Common Mistakes:
  • Using dash instead of dot in keys
  • Assuming dashes are allowed
  • Ignoring syntax errors in keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes