Skip to content

Instantly share code, notes, and snippets.

@gomzie
Created September 9, 2012 07:03
Show Gist options
  • Save gomzie/3683093 to your computer and use it in GitHub Desktop.
Save gomzie/3683093 to your computer and use it in GitHub Desktop.
trace-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
<!-- For parsing classes with @Aspect annotation -->
<aop:aspectj-autoproxy/>
<bean id="customizableTraceInterceptor" class="org.spring.mongo.aop.TraceInterceptor"
p:enterMessage="Entering $[targetClassShortName].$[methodName]($[arguments])"
p:exitMessage="Leaving $[targetClassShortName].$[methodName](): $[returnValue]"/>
<aop:config>
<aop:advisor advice-ref="customizableTraceInterceptor" pointcut="execution(public * org.spring.mongo.service..*(..))"/>
<aop:advisor advice-ref="customizableTraceInterceptor" pointcut="execution(public * org.spring.mongo.controller..*(..))"/>
</aop:config>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment