Home / CSE MCQs / Spring MCQs :: Discussion

Discussion :: Spring MCQs

  1. Which advice is executed only when joint point returns or throws an exception?
  2. A.
    @Before
    B.
    @After
    C.
    @AfterReturning
    D.
    @AfterThrowing

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    If you would like to perform logging only when a join point returns, you should replace the after advice with an after returning advice.


Be The First To Comment