October 2017
Intermediate to advanced
396 pages
10h 2m
English
Let's see the use of @After annotation:
//After transfer service
@After ("execution(* com.packt.patterninspring.chapter6. bankapp.service.TransferService.transfer(..))")
public void trackTransactionAttempt(){
System.out.println("bank has attempted a transaction");
}
Use @After annotation called regardless of whether an exception has been thrown by the target or not.
Read now
Unlock full access