java类org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor的实例源码

CasWebApplicationContext.java 文件源码 项目:cas-5.1.0 阅读 23 收藏 0 点赞 0 评论 0
/**
 * {@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();
}
SchedulingUtils.java 文件源码 项目:cas-5.1.0 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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;
}
ConfigClientRefreshAutoConfigurationTest.java 文件源码 项目:spring-cloud-config-refresh 阅读 19 收藏 0 点赞 0 评论 0
@Test
public void shouldRegisterSchedulerPostProcessor() {

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

    // then
    assertNotNull(bean);
}
TestDstu3Config.java 文件源码 项目:hapi-fhir 阅读 18 收藏 0 点赞 0 评论 0
@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);
        }
    }
}
SampleHornetQApplication.java 文件源码 项目:https-github.com-g0t4-jenkins2-course-spring-boot 阅读 21 收藏 0 点赞 0 评论 0
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}
SampleHornetQApplication.java 文件源码 项目:spring-boot-concourse 阅读 20 收藏 0 点赞 0 评论 0
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}
SampleHornetQApplication.java 文件源码 项目:contestparser 阅读 18 收藏 0 点赞 0 评论 0
@Bean
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationBeanPostProcessor() {
    return new ScheduledAnnotationBeanPostProcessor();
}


问题


面经


文章

微信
公众号

扫码关注公众号