Search in sources :

Example 1 with MonitoredMeasuringPointcut

use of org.javasimon.spring.MonitoredMeasuringPointcut in project springside4 by springside.

the class JavaSimonConfig method monitoringAdvisor.

// 定义AOP, 对标注了@Monitored的方法进行监控
@Bean(name = "monitoringAdvisor")
public DefaultPointcutAdvisor monitoringAdvisor() {
    DefaultPointcutAdvisor monitoringAdvisor = new DefaultPointcutAdvisor();
    monitoringAdvisor.setAdvice(new MonitoringInterceptor());
    monitoringAdvisor.setPointcut(new MonitoredMeasuringPointcut());
    return monitoringAdvisor;
}
Also used : MonitoringInterceptor(org.javasimon.spring.MonitoringInterceptor) MonitoredMeasuringPointcut(org.javasimon.spring.MonitoredMeasuringPointcut) DefaultPointcutAdvisor(org.springframework.aop.support.DefaultPointcutAdvisor) ServletRegistrationBean(org.springframework.boot.context.embedded.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

MonitoredMeasuringPointcut (org.javasimon.spring.MonitoredMeasuringPointcut)1 MonitoringInterceptor (org.javasimon.spring.MonitoringInterceptor)1 DefaultPointcutAdvisor (org.springframework.aop.support.DefaultPointcutAdvisor)1 ServletRegistrationBean (org.springframework.boot.context.embedded.ServletRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1