Exam 2v0-7222 All QuestionsBrowse all questions from this exam
Question 46

Which statement describes the @AfterReturning advice type? (Choose the best answer.)

    Correct Answer: A

    The @AfterReturning advice type is invoked only if the method returns successfully but not if it throws an exception. This type of advice is used to execute actions after a method completes normally and is a key part of aspect-oriented programming in frameworks like Spring AOP.

Discussion
AzuniOption: A

Correct. Refer to class documentation: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/aop/AfterReturningAdvice.html