List of usage examples for org.springframework.aop.support Pointcuts union
public static Pointcut union(Pointcut pc1, Pointcut pc2)
From source file:net.bull.javamelody.JavaMelodyAutoConfiguration.java
/** * Monitoring of beans or methods having the {@link Async} annotation. * @return MonitoringSpringAdvisor// w w w. ja v a2 s. com */ @Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "spring-monitoring-enabled", matchIfMissing = true) public MonitoringSpringAdvisor monitoringSpringAsyncAdvisor() { return new MonitoringSpringAdvisor(Pointcuts.union(new AnnotationMatchingPointcut(Async.class), new AnnotationMatchingPointcut(null, Async.class))); }
From source file:net.bull.javamelody.JavaMelodyAutoConfiguration.java
/** * Monitoring of beans methods having the {@link Scheduled} or {@link Schedules} annotations. * @return MonitoringSpringAdvisor/*w ww . j a va 2 s .c o m*/ */ @Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "spring-monitoring-enabled", matchIfMissing = true) public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() { return new MonitoringSpringAdvisor(Pointcuts.union(new AnnotationMatchingPointcut(null, Scheduled.class), new AnnotationMatchingPointcut(null, Schedules.class))); }