Bird
0
0

Given this application.properties snippet:

medium📝 state output Q4 of 15
Spring Boot - Application Configuration
Given this application.properties snippet:
spring.profiles.active=prod
server.port=9090

What port will the Spring Boot app run on when started?
A8080
B9090
C80
DDefault random port
Step-by-Step Solution
Solution:
  1. Step 1: Identify active profile and port setting

    The active profile is 'prod' and server.port is set to 9090.
  2. Step 2: Understand port precedence

    Explicit server.port=9090 overrides default 8080 port.
  3. Final Answer:

    9090 -> Option B
  4. Quick Check:

    Explicit server.port value sets app port [OK]
Quick Trick: Explicit server.port overrides default port [OK]
Common Mistakes:
  • Assuming default 8080 always used
  • Confusing profile with port
  • Thinking random port is default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes