Bird
0
0

To build a Spring Boot application that configures a web server and connects to a database with minimal manual setup, which two features should you leverage?

hard📝 Application Q8 of 15
Spring Boot - Fundamentals
To build a Spring Boot application that configures a web server and connects to a database with minimal manual setup, which two features should you leverage?
AManual XML configuration and custom servlet registration
BAuto-configuration and starter dependencies
CExplicit bean definitions and manual dependency injection
DUsing only the Spring Core module without starters
Step-by-Step Solution
Solution:
  1. Step 1: Understand auto-configuration

    Spring Boot auto-configures components like web servers and databases based on classpath.
  2. Step 2: Recognize starter dependencies

    Starters bundle common dependencies to simplify setup.
  3. Step 3: Eliminate incorrect options

    Manual XML and explicit bean definitions increase setup complexity.
  4. Final Answer:

    Auto-configuration and starter dependencies -> Option B
  5. Quick Check:

    Auto-config + starters = minimal setup [OK]
Quick Trick: Use auto-config and starters for quick setup [OK]
Common Mistakes:
  • Relying on manual XML config
  • Ignoring starter dependencies
  • Using only core Spring without starters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes