Skip to content

Instantly share code, notes, and snippets.

@ezbz
Created June 12, 2012 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezbz/2919528 to your computer and use it in GitHub Desktop.
Save ezbz/2919528 to your computer and use it in GitHub Desktop.
spring interceptor
<bean id="myMonitoredProxyFactoryTemplate" class="org.springframework.aop.framework.ProxyFactoryBean" abstract="true">
<property name="interceptorNames">
<list>
<value> myPerformanceInterceptor </value>
</list>
</property>
<property name="proxyTargetClass" value="false" />
</bean>
<bean id="myPerformanceInterceptor" parent="baseMetricsMethodInterceptor">
<constructor-arg value="myComponent" />
</bean>
<bean id="myMonitoredBean" parent="myMonitoredProxyFactoryTemplate">
<property name="target">
<bean class="com.outbrain.MyMonitoredClass" />
</property>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment