org.springframework.config.java
Class AspectTests

java.lang.Object
  extended by org.springframework.config.java.AspectTests

public class AspectTests
extends Object

This test showcases the most up-to-date techniques for using aspects within Spring JavaConfig. Currently, the programming model is a bit awkward, perhaps a lot awkward. See the method comments below for details. We'll want to consider changing this before 1.0 GA.

Author:
Chris Beams

Nested Class Summary
static class AspectTests.AppConfig
           
static class AspectTests.ConfigWithAspects
          Notice how the Configuration class is also an Aspect? This is strange, and I believe unintuitive/surprising for users of Spring AOP coming from the XML world.
static class AspectTests.PropertyChangeTracker
           
static class AspectTests.Service
           
 
Constructor Summary
AspectTests()
           
 
Method Summary
 void testApplicationOfSimpleAspect()
          Here we're going to create a new AppCtx against the AspectTests.ConfigWithAspects configuration, and prove that our advice gets applied properly.
 void testAspectModularity()
          This test is all about demonstrating how to define a standalone, reusable aspect and then use it within a given Configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AspectTests

public AspectTests()
Method Detail

testApplicationOfSimpleAspect

public void testApplicationOfSimpleAspect()
Here we're going to create a new AppCtx against the AspectTests.ConfigWithAspects configuration, and prove that our advice gets applied properly.


testAspectModularity

public void testAspectModularity()
This test is all about demonstrating how to define a standalone, reusable aspect and then use it within a given Configuration. Trouble is, that we'll see that our 'standalone aspect' also has to be a Configuration.



Copyright ? 2005-2008 Spring Framework. All Rights Reserved.