Open sthzg opened 9 years ago
+1 wanna know why too.
+1
+1
Yeah, I don't know how to finish the example when you use @DeclareParents
+1 Has some example about @DeclareParents ?
` public class DefaultEncoreable implements Encoreable {
@Override public void performEncore() { System.out.println("encore"); } }`
` @Aspect public class EncoreableIntroducer {
@DeclareParents(value = "chapter_4_concert.domain.Performance+", defaultImpl = DefaultEncoreable.class)
public static Encoreable encoreable;
}
using:
@Autowired
private Performance performance;
Encoreable encore = (Encoreable) performance;
encore.performEncore();
assertEquals("encore\n", systemOutRule.getLog());
`
These are my idea about using @DeclareParents.
+1
Can we have a sample code for chapter 4 that includes test?
Is chapter 4 example code missing ?
Is there a reason why sample code from chapter 4 is not available?