Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware 2V0-72.22 Exam - Topic 7 Question 87 Discussion

Posted by Amie on May 31, 2026 at 12:28 AM

Which statement is true? (Choose the best answer.)

Suggested Answer: D

A bean definition profile is a named logical grouping of bean definitions that can be activated or deactivated in different environments. For example, we can define different profiles for development, testing, and production environments. Spring provides the @Profile annotation to mark a bean definition or a configuration class as belonging to a specific profile. To activate a profile, we can use the spring.profiles.active property or the ConfigurableEnvironment.setActiveProfiles() method.

The @ActiveProfiles annotation is a class-level annotation that is used in conjunction with the Spring TestContext Framework to declare which profiles should be active when loading an ApplicationContext for an integration test. This annotation can be applied to any class annotated with @ContextConfiguration or a meta-annotation that is composed of @ContextConfiguration.


Get Premium 2V0-72.22 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
17 comments · newest first
LA
Lazaro 1 month ago
I feel confident about D now. Good discussion!
PA
Patria 1 month ago
I see your point. D does fit the context of integration tests.
SH
Shawnda 1 month ago
D clarifies the purpose of @ActiveProfiles well.
HU
Huey 2 months ago
Exactly! Profiles control which beans are active.
LA
Lazaro 2 months ago
B is close, but D covers profiles better.
PA
Patria 2 months ago
I’m leaning towards B. It’s about bootstrapping, right?
SH
Shawnda 2 months ago
Agreed, D seems accurate. Profiles are key for context.
HU
Huey 2 months ago
I think D is the right answer. It makes sense for integration tests.
ER
Ernie 2 months ago
A is definitely not it, that’s for sure!
TU
Tu 3 months ago
C sounds kinda close, but I’m not sure.
KE
Kerry 3 months ago
Wait, is it really just for bean profiles?
LU
Luis 3 months ago
Totally agree with D!
SA
Salina 3 months ago
I think D is the right one!
LE
Lenna 3 months ago
I remember that @ActiveProfiles is definitely about profiles, but I can't remember if it also deals with properties files like option C suggests.
EM
Emilio 4 months ago
I’m a bit confused about the differences between B and D. Both seem to relate to configuring the Spring TestContext, but I can't recall the specifics.
JA
Jade 4 months ago
I feel like I saw a similar question about Spring annotations in our practice tests, and I think D might be the right choice since it mentions active profiles.
SO
Solange 4 months ago
I think I remember that @ActiveProfiles is related to setting up the environment for tests, but I'm not sure which option is correct.
0/2000 characters

Save Cancel