intermediateSpring Boot Fundamentals320 of 469
What are Spring Profiles and why are they used?
Tests whether you describe profiles as a mechanism to activate environment-specific beans/configuration (dev, test, prod) at startup via spring.profiles.active, so the same codebase can swap datasources, logging levels, or mocked beans per environment without code changes.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response