package meteo;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Service;

/**
 * Created by mint on 19/05/16.
 */
@Aspect
@Service
public class TwitterService {
    @AfterReturning(pointcut = "execution(* getWeather(..))", returning = "retVal")
    public void sendTweet(Object retVal){
        System.err.println("\n\n**********\n\nAspect !\n" +
                "\n" +
                "**********\n" +
                "\n");
    }
}

@@ -9,16 +9,51 @@
 meteo;%0A%0A
+import org.aspectj.lang.JoinPoint;%0A
 import o
@@ -176,23 +176,25 @@
 reotype.
-Service
+Component
 ;%0A%0A/**%0A 
@@ -237,23 +237,25 @@
 Aspect%0A@
-Service
+Component
 %0Apublic 
@@ -301,19 +301,8 @@
 ing(
-pointcut = 
 %22exe
@@ -324,35 +324,21 @@
 ther
-(..))%22, returning = %22retVal
+Forecast(..))
 %22)%0A 
@@ -366,21 +366,27 @@
 eet(
-Object retVal
+JoinPoint joinPoint
 )%7B%0A 

version aspect OK