Spring Boot - FundamentalsYou want to run a Spring Boot application with a custom profile named 'dev'. Which command line argument should you use?A--spring.profiles.active=devB--profile=devC-Dspring.profile=devD--spring.active.profile=devCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall Spring Boot profile activation syntaxThe correct property to activate a profile is spring.profiles.active.Step 2: Match correct command line argumentUse --spring.profiles.active=dev to activate the 'dev' profile at runtime.Final Answer:--spring.profiles.active=dev -> Option AQuick Check:Activate profile with --spring.profiles.active [OK]Quick Trick: Use --spring.profiles.active=profileName to set profile [OK]Common Mistakes:Using wrong property namesConfusing system properties with Spring propertiesOmitting 'profiles' keyword
Master "Fundamentals" in Spring Boot9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Spring Boot Quizzes Application Configuration - Profile-based configuration - Quiz 11easy Exception Handling - Custom exception classes - Quiz 2easy Logging - Logger creation in classes - Quiz 10hard REST Controllers - @RestController annotation - Quiz 12easy REST Controllers - @PathVariable for URL parameters - Quiz 11easy Request and Response Handling - Custom response headers - Quiz 3easy Spring Annotations - @Profile for environment-specific beans - Quiz 12easy Spring Annotations - @Value for property injection - Quiz 2easy Spring Boot Fundamentals - Spring Initializr for project creation - Quiz 6medium Spring Boot Fundamentals - Why Spring Boot over plain Spring - Quiz 5medium