Bird
0
0

Given this Spring Boot application.properties setting:

medium📝 component behavior Q13 of 15
Spring Boot - Fundamentals
Given this Spring Boot application.properties setting:
server.port=8085
What will happen when you run the app with embedded Tomcat?
AThe embedded server will start on port 8085.
BThe server will ignore this and use default port 8080.
CThe app will fail to start due to invalid port.
DThe server will start on port 80.
Step-by-Step Solution
Solution:
  1. Step 1: Understand server.port property

    Setting server.port changes the embedded server's listening port.
  2. Step 2: Apply property effect

    Since 8085 is valid, the embedded Tomcat will start on port 8085.
  3. Final Answer:

    The embedded server will start on port 8085. -> Option A
  4. Quick Check:

    server.port sets embedded server port [OK]
Quick Trick: server.port config changes embedded server port [OK]
Common Mistakes:
  • Assuming default port always used
  • Thinking invalid port causes failure (8085 is valid)
  • Confusing port 80 as default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes