Bird
0
0

Why is it important to keep the parent pom.xml free of application code in a Spring Boot multi-module project?

hard📝 Conceptual Q10 of 15
Spring Boot - Advanced Patterns
Why is it important to keep the parent pom.xml free of application code in a Spring Boot multi-module project?
ABecause parent pom.xml cannot compile Java code
BTo avoid version conflicts in dependencies
CTo maintain clear separation of build configuration and application logic
DBecause Spring Boot does not support code in parent modules
Step-by-Step Solution
Solution:
  1. Step 1: Understand parent pom role

    The parent pom manages build and dependency configuration, not application code.
  2. Step 2: Importance of separation

    Separating build config from code keeps project organized and maintainable.
  3. Final Answer:

    Maintain clear separation of build config and application logic -> Option C
  4. Quick Check:

    Parent pom = build config only, no code [OK]
Quick Trick: Keep parent pom for config, not code [OK]
Common Mistakes:
  • Thinking parent pom can hold application code
  • Confusing build config with runtime code

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes