PDA

View Full Version : AOP using @annotation, argNames and returning



craiggreenhalgh
Aug 7th, 2007, 07:34 AM
Hi I have setup my method as:

@AfterReturning(value="@annotation(eventLogable)", argNames="eventLogable", returning="returnValue")
public void log(EventLogable eventLogable, Object returnValue ) {
}

However I get the error:

Caused by: java.lang.IllegalStateException: Expecting to find 2 arguments to bind by name in advice, but actually found 1 arguments.

When I boot up,

Have anyone any ideas?

Thanks

Craig