Mar 13 2008

Spring AOP with aspectJ and JDK5 annotations

Published by Gilles at 4:01 pm under Spring

The figure below shows the introduction of the aspect paradigm in a application. The first part shows 3 classes with a cross-cutting function (logging, for example). The second part shows the same application after theintroduction of the paradigm. The functionality is now isolated in only one class.

Aspect

Spring and
Since version 2.0, Spring provides two ways of creating aspects with AspectJ: trough XML configuration with the spring AOP schema or with Java 5 annotations. The first form has the benefit to be backward compatible with older versions of . The second one has a shorter syntax and is compatible with AspectJ. We will investigate this one in details.

Pages: 1 2 3 4 5 6

Trackback URI | Comments RSS

Leave a Reply