Skip to content

Commit

Permalink
Updated errata and source code with proper code for example of NamePo…
Browse files Browse the repository at this point in the history
…intcutUsingAdvisor, without pointcut (submitted by yyi)
  • Loading branch information
iuliana committed Feb 17, 2018
1 parent be1b48d commit 73b1fdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Binary file modified 9781484228074_Errata.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion chapter05/aspectj-aspects/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
apply plugin: 'aspectj'

jar {
manifest {
manifest {NamePointcutUsingAdvisor
attributes(
"Created-By": "Iuliana Cosmina",
"Specification-Title": "Pro Spring 5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ public class NamePointcutUsingAdvisor {
public static void main(String... args) {
GrammyGuitarist johnMayer = new GrammyGuitarist();

NameMatchMethodPointcut pc = new NameMatchMethodPointcut();
pc.addMethodName("sing");
pc.addMethodName("rest");
NameMatchMethodPointcutAdvisor advisor = new NameMatchMethodPointcutAdvisor(new SimpleAdvice());
advisor.setMappedNames("sing");
advisor.setMappedNames("rest");

Advisor advisor = new NameMatchMethodPointcutAdvisor(new SimpleAdvice());
ProxyFactory pf = new ProxyFactory();
pf.setTarget(johnMayer);
pf.addAdvisor(advisor);
Expand Down

0 comments on commit 73b1fdc

Please sign in to comment.