Spring Boot - FundamentalsYou want to disable Spring Boot's auto-configuration for JPA but keep others enabled. Which is the correct way to do this?ARemove all dependencies except JPA starterBAdd <code>@SpringBootApplication(exclude = JpaAutoConfiguration.class)</code> on main classCSet <code>spring.autoconfigure.enabled=false</code> in application.propertiesDDelete the <code>spring.factories</code> file from the jarCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify how to exclude specific auto-configSpring Boot allows excluding specific auto-config classes using the exclude attribute on @SpringBootApplication.Step 2: Evaluate other optionsRemoving dependencies disables features but is not selective; disabling all auto-config is too broad; deleting spring.factories breaks the framework.Final Answer:Add @SpringBootApplication(exclude = JpaAutoConfiguration.class) on main class -> Option BQuick Check:Exclude specific auto-config via annotation [OK]Quick Trick: Use exclude attribute on @SpringBootApplication [OK]Common Mistakes:Disabling all auto-config instead of oneRemoving dependencies instead of excluding configModifying internal Spring Boot files
Master "Fundamentals" in Spring Boot9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Spring Boot Quizzes Exception Handling - Validation error responses - Quiz 10hard Exception Handling - @ExceptionHandler in controllers - Quiz 15hard Logging - Package-level log configuration - Quiz 8hard Logging - Package-level log configuration - Quiz 4medium REST Controllers - @PathVariable for URL parameters - Quiz 1easy Request and Response Handling - Request mapping by method and path - Quiz 9hard Request and Response Handling - Custom response headers - Quiz 13medium Request and Response Handling - JSON serialization with Jackson - Quiz 11easy Request and Response Handling - Why understanding request flow matters - Quiz 12easy Spring Boot Fundamentals - What is Spring Boot - Quiz 12easy