Java 类org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor 实例源码

项目:cas-5.1.0    文件:CasWebApplicationContext.java   
/**
 * {@inheritDoc}
 * Reset the value resolver on the inner {@link ScheduledAnnotationBeanPostProcessor}
 * so that we can parse durations. This is due to how {@link org.springframework.scheduling.annotation.SchedulingConfiguration}
 * creates the processor and does not provide a way for one to inject a value resolver.
 */
@Override
protected void onRefresh() {
    final ScheduledAnnotationBeanPostProcessor sch = (ScheduledAnnotationBeanPostProcessor)
            getBeanFactory().getBean(TaskManagementConfigUtils.SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME, BeanPostProcessor.class);
    sch.setEmbeddedValueResolver(new CasConfigurationEmbeddedValueResolver(this));
    super.onRefresh();
}
项目:cas-5.1.0    文件:SchedulingUtils.java   
/**
 * Gets string value resolver.
 *
 * @param applicationContext the application context
 * @return the string value resolver
 */
public static StringValueResolver prepScheduledAnnotationBeanPostProcessor(final ApplicationContext applicationContext) {
    final StringValueResolver resolver = new CasConfigurationEmbeddedValueResolver(applicationContext);
    final ScheduledAnnotationBeanPostProcessor sch = applicationContext.getBean(ScheduledAnnotationBeanPostProcessor.class);
    sch.setEmbeddedValueResolver(resolver);
    return resolver;
}
项目:spring-cloud-config-refresh    文件:ConfigClientRefreshAutoConfigurationTest.java   
@Test
public void shouldRegisterSchedulerPostProcessor() {

    // when
    ScheduledAnnotationBeanPostProcessor bean =
            applicationContext.getBean(ScheduledAnnotationBeanPostProcessor.class);

    // then
    assertNotNull(bean);
}
项目:hapi-fhir    文件:TestDstu3Config.java   
@Override
public void postProcessBeanFactory(final ConfigurableListableBeanFactory beanFactory) throws BeansException {
    String schedulingDisabled = myEnvironment.getProperty("scheduling_disabled");
    if ("true".equals(schedulingDisabled)) {
        for (String beanName : beanFactory.getBeanNamesForType(ScheduledAnnotationBeanPostProcessor.class)) {
            ((DefaultListableBeanFactory) beanFactory).removeBeanDefinition(beanName);
        }
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SampleHornetQApplication.java   
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}
项目:spring-boot-concourse    文件:SampleHornetQApplication.java   
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}
项目:contestparser    文件:SampleHornetQApplication.java   
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}