View RSS Feed

Spring Framework

SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.

  1. How to Inject AspectJ Aspects into Spring

    by , 11-29-2011 at 03:53 AM
    For those of you who have already worked with Spring AOP knows that it is sufficient for many of the applications of aspects that are generally done in a system. Still it is weak in certain areas of AOP solution in contrast to AspectJ that has added a number of powerful features over time. There are now many types of AspectJ pointcuts that arenít possible with Spring AOP.

    For example, Springís proxy-based AOP is not able to advise on object creation. This is because constructors in ...
    Categories
    AOP , Spring 3
  2. Writing AOP in Spring

    by , 11-16-2011 at 06:35 PM
    In this last installment of Spring AOP, we will provide an example of how to use AOP in Spring.
    In the listing below, we add a car to an order.

    Java Code:
    package com.acme.springexamples.main;
    import com.acme.springexamples.service.CarService;
    import com.acme.springexamples.service.OrderService;
    ...
    public class Main { public static void main(String[] args) {
    	ApplicationContext context = 
    		new ClassPathXmlApplicationContext("META-INF/spring/*.xml");
    ...
  3. More AOP in Spring Part 2

    by , 11-16-2011 at 06:26 PM
    Along with aspectís advice, pointcuts, which are used to pinpoint where an aspectís advice should be applied, are considered among the most fundamental elements of an aspect. In Spring AOP, we define pointcuts using AspectJís pointcut expression language. If youíre already know AspectJ, then defining pointcuts in Spring should feel natural. Otherwise, I will provide you with quick tips that will help you with writing AspectJ-style pointcuts.

    In Spring AOP, the key thing to remember ...
    Tags: aop, spring aop Add / Edit Tags
    Categories
    AOP
  4. More on AOP in Spring Part 1

    by , 11-16-2011 at 06:03 PM
    In the previous tip, we started to look at Aspect Oriented Programming support in Spring. In this tip we will continue with this assessment of this exciting technology. Before we start there are a number of terms that I need to introduce to you in order that you can speak the lingo of AOP. I list these terms below:
    • Advice - I had briefly mentioned this is the last tip. Advice is the code to be executed at a join point that has been selected by a pointcut. Advice can execute before, after,
    ...

    Updated 11-16-2011 at 06:05 PM by Spring Framework

    Categories
    AOP