View RSS Feed

Spring Framework

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

  1. 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");
  2. 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
  3. 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

  4. An Introduction to Aspect Oriented Programming

    by , 11-16-2011 at 05:58 PM
    Aspect-oriented programming (AOP) is a new methodology that provides separation of crosscutting concerns. Crosscutting concerns are system wide concerns that span multiple modules. In applications, these system wide concerns would involve features such as logging, security, persistence and any other element common to a majority of the core business modules. This type of programming is done by introducing a new unit of modularization—an aspect—that crosscuts other modules. Using AOP you would implement ...
    Tags: aop, aspectj Add / Edit Tags