Question 1: CORE SPRING BOOT - Purpose of Profiles
What is the main purpose of using profiles in Spring Boot?
Question 2: CORE SPRING BOOT - @Profile Annotation
Which of the following best describes the @Profile annotation?
Question 3: CORE SPRING BOOT - Activating Profiles
How can you activate a Spring profile in a Spring Boot application?
Question 4: CORE SPRING BOOT - Profile-Specific YAML
Which of the following is a correct way to define a profile-specific configuration in YAML?
Question 5: CORE SPRING BOOT - Code Snippet (@Profile)
What will happen when this code runs with the "dev" profile active?
Question 6: CORE SPRING BOOT - Multiple Profiles in a Bean
How can you make a bean active for multiple profiles?
Question 7: CORE SPRING BOOT - Code Snippet (Profile-Specific Property)
Which value will be injected into port when the "prod" profile is active?
Question 8: CORE SPRING BOOT - Default Profile
What is the default profile in Spring Boot if no profile is explicitly activated?
Question 9: CORE SPRING BOOT - Code Snippet (@Profile with Configuration)
Consider the following configuration class:
What happens when the "dev" profile is active?
Question 10: CORE SPRING BOOT - Best Practices with Profiles
Which of the following is considered a best practice when using Spring Boot profiles?