Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 20 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 20
Topic #: 1
[All 2V0-72.22 Questions]

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

  • A. @ActiveProfiles is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.
  • B. @ActiveProfiles is a class-level annotation that you can use to configure how the Spring TestContext Framework is bootstrapped.
  • C. @ActiveProfiles is a class-level annotation that you can use to configure the locations of properties files and inlined properties to be added to the set of PropertySources in the Environment for an ApplicationContext loaded for an integration test.
  • D. @ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loaded an ApplicationContext for an integration test.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
2211094
5 months, 2 weeks ago
The Corect answer is D. And here is why others are not correct. A: @ActiveProfiles doesn't deal with recording application events. The Spring TestContext Framework handles event publication and listening separately. B: @ActiveProfiles is specific to activating bean definition profiles for integration tests. It doesn't configure the overall bootstrapping of the TestContext Framework. C: While @ActiveProfiles indirectly affects the environment, it doesn't directly configure the locations of property files or inline properties. That's typically done through @TestPropertySource or other configuration mechanisms.
upvoted 1 times
...
james2033
9 months, 2 weeks ago
Selected Answer: D
'@ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loading an ApplicationContext for an integration test.' Source https://docs.spring.io/spring-framework/reference/testing/annotations/integration-spring/annotation-activeprofiles.html
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...