Spring AOP has a method-level tracer called CustomizableTraceInterceptor
. Using Spring\'s XML configuration approach, one would set up this tracer like so:
Unfortunately, you cannot because the Java language does not support method literals which would be needed to support this in Spring JavaConfig. A bug was opened for this but marked as "Won't Fix": https://jira.springsource.org/browse/SPR-8148.
The two options mentioned in the bug report are:
by including the relevant XML snippet using @ImportResource
elemements to use @Aspect
style. [which is not possible with the CustomizableTraceInterceptor
]