Spring Boot - FundamentalsIf you add a dependency for Spring Data JPA in a Spring Boot project, what happens by default?ASpring Boot disables JPA auto-configurationBYou must manually configure the EntityManagerFactory beanCSpring Boot auto-configures JPA and connects to an in-memory database if none specifiedDThe application fails to start without XML configCheck Answer
Step-by-Step SolutionSolution:Step 1: Recognize Spring Boot's auto-configuration for JPAWhen Spring Data JPA dependency is present, Spring Boot auto-configures JPA and sets up an in-memory database if no other DB is configured.Step 2: Contrast with manual config needsManual bean setup is not required; Spring Boot handles it automatically.Final Answer:Spring Boot auto-configures JPA and connects to an in-memory database if none specified -> Option CQuick Check:JPA auto-config = C [OK]Quick Trick: Spring Boot auto-configures JPA with in-memory DB if none set [OK]Common Mistakes:Thinking manual EntityManagerFactory setup is neededAssuming auto-configuration disables JPABelieving XML config is mandatory
Master "Fundamentals" in Spring Boot9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Spring Boot Quizzes Exception Handling - ResponseEntityExceptionHandler - Quiz 1easy Inversion of Control and Dependency Injection - Field injection and why to avoid it - Quiz 1easy Inversion of Control and Dependency Injection - @Qualifier for ambiguous beans - Quiz 13medium REST Controllers - @GetMapping for GET requests - Quiz 7medium Request and Response Handling - Request mapping by method and path - Quiz 6medium Request and Response Handling - Request validation preview - Quiz 13medium Request and Response Handling - JSON serialization with Jackson - Quiz 12easy Request and Response Handling - Request validation preview - Quiz 4medium Spring Boot Fundamentals - POM.xml and dependencies - Quiz 10hard Spring Boot Fundamentals - Application.properties basics - Quiz 10hard