October 2017
Intermediate to advanced
396 pages
10h 2m
English
Let's see the use of @Before annotation:
//Before transfer service
@Before("execution(* com.packt.patterninspring.chapter6. bankapp.service.TransferService.transfer(..))")
public void validate(){
System.out.println("bank validate your credentials before amount transferring");
}
//Before transfer service
@Before("execution(* com.packt.patterninspring.chapter6. bankapp.service.TransferService.transfer(..))")
public void transferInstantiate(){
System.out.println("bank instantiate your amount transferring");
}
Now you have seen the before advice, let's have a look into another type advice.
Read now
Unlock full access