Aspect for method entry and exit logging

@Aspect
public class Aspect
{

    @Before("execution(* com.test.*.*(..))")
    public void logBefore(JoinPoint joinPoint)
    {
        logEnter.....
    }

    @After("execution(* com.test.*.*(..))")
    public void logAfter(JoinPoint joinPoint)
    {
         logExit.....
    }
}


Spring config:
<aop:aspectj-autoproxy/>
	
<bean id="aspect" class="com.test.Aspect"></bean>

Remarks:
Spring 3.1.0

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326610517&siteId=291194637