Bird
0
0

Which of the following lines is syntactically correct to set the server port to 9090 in application.properties?

easy📝 Syntax Q3 of 15
Spring Boot - Application Configuration
Which of the following lines is syntactically correct to set the server port to 9090 in application.properties?
Aserver_port=9090
Bserver.port=9090
Cserver.port:9090
Dserver-port=9090
Step-by-Step Solution
Solution:
  1. Step 1: Recall server port property syntax

    Spring Boot uses dot notation and equals sign: server.port=9090.
  2. Step 2: Identify correct syntax among options

    Only server.port=9090 uses dot and equals sign correctly.
  3. Final Answer:

    server.port=9090 -> Option B
  4. Quick Check:

    Property syntax = key=value with dots [OK]
Quick Trick: Use dot notation and equals sign for properties [OK]
Common Mistakes:
  • Using dash or underscore instead of dot
  • Using colon instead of equals sign
  • Mixing separators

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes