Testing in Spring 3.0 much better. Use @Setup or @Test , @RunWith @ContextConfiguration annotations.
What is AOP
- Capture functionality used throughout app in a single, reusable way, e.g. transaction, logging, security.
- Transaction management, logging, security are cross cutting concerns cutting across multiple objects.
- AOP is the implementation of these cross cutting concern.
Join point: a point in the execution of a program such as a method call or a field assignment. e.g., method1 in Class A and method2 in Class B are the join points that require transaction related advice.
Pointcut: An expression that selects one or more join points. Advice can be associated with a pointcut expression and runs at any join point method.
Advice: Code that is executed at a particular join point that has been selected by a Poincut. Different types of advices are “around,” “before” and “after” advice.
Aspect: A module that encapsulates pointcuts and advice. e.g., transaction, security, logging in this case.
Spring AOP uses aspectJ expression language: http://www.eclipse.org/aspectj
designator (* package.Class.method*(..))
@Before @AfterReturning @AfterThrowing @After @Around
ACID: Atomic, Consistent, Isolated, Durable
ACEGI – former name for spring security ~ every other letter (missing B,D,F,H)
No comments yet.