Refer to the exhibit.
What statement is true about @DirtiesContext?
Refer to the exhibit.
What statement is true about @DirtiesContext?
The @DirtiesContext annotation in a Spring test will close the existing cached ApplicationContext and recreate a new one after the test method. This ensures that changes made during the test do not affect subsequent tests, thereby providing a clean application context for the following tests.
A is the correct answer. Here is reference: https://docs.spring.io/spring-framework/reference/testing/annotations/integration-spring/annotation-dirtiescontext.html