<bean id="notifySpringScheduledExecutorFactoryBean" class="org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean"> <property name="scheduledExecutorTasks">
-
<list>
-
<ref bean="notifySpringScheduledExecutorTask" />
-
</list>
-
</property>
-
</bean>
-
-
<bean id="notifySpringScheduledExecutorTask" class="org.springframework.scheduling.concurrent.ScheduledExecutorTask">
-
<property name="runnable" ref="notifyScheduledMainExecutor" />
-
-
<property name="delay" value="60000" />
-
-
<property name="period" value="120000" />
-
-
-
<property name="fixedRate" value="true" />
-
</bean>
-
-
<bean id="notifyScheduledMainExecutor" class="com.alisoft.aep.notify.schedual.NotifyScheduledMainExecutor">
-
-
<property name="notifyServerService" ref="notifyServerService" />
-
-
<property name="notifyIdCacheStrategy" ref="defaultNotifyIdCacheStrategy" />
-
-
-
-
-
-
-
-
-
-
<property name="notifyTaskExecutor" ref="notifyTaskExecutor" />
-
-
<property name="maxNum" value="1000" />
-
<property name="notifyDao" ref="notifyDao" />
-
</bean>
-
-
-
<bean id="notifyTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
-
-
<property name="corePoolSize" value="10" />
-
-
<property name="maxPoolSize" value="50" />
-
-
<property name="queueCapacity" value="1000" />
-
-
<property name="keepAliveSeconds" value="300" />
-
-
<property name="rejectedExecutionHandler">
-
-
-
-
-
<bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy" />
-
</property>
-
</bean>
-
<bean id="notifyServerService" class="com.alisoft.aep.notify.service.impl.NotifyServerServiceImpl">
-
-
<property name="notifyRetryStrategy" ref="defaultNotifyRetryStrategy" />
-
-
-
-
-
<property name="notifyIdCacheStrategy" ref="defaultNotifyIdCacheStrategy" />
-
-
<property name="transactionTemplate" ref="transactionTemplate" />
-
<property name="notifyDao" ref="notifyDao" />
-
</bean>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sfdev/archive/2009/04/08/4056114.aspx
分享到:
相关推荐
l Spring封装Job调度:当任务信息都持久化在DB中之后,我们需要将这些信息读取出来执行具体的业务逻辑操作,这里我们通过ScheduledExecutorFactoryBean来实现对任务的循环调度,比如说可采取每隔5min扫描一次待处理...
NULL 博文链接:https://dave-2009.iteye.com/blog/769637
1. SpringBoot 自定义线程池以及多线程间的异步调用(@Async、@EnableAsync) 2.Java多线程之定时任务 以及 SpringBoot多线程实现定时任务 3.@EnableScheduling 与 @Scheduled
Spring中的同步执行器 1. SyncTaskExecutor:同步可以用SyncTaskExecutor,但这个可以说不算一个线程池,因为还在原线程执行。这个类没有实现异步调用...前者是同步执行器,执行任务同步,后者是线程池,执行任务异步。
3.使用Spring的异步任务(AsyncTask): 使用@Async注解可以将普通的方法异步执行,使其成为一个异步任务。可以在方法上添加@Async注解并配合@EnableAsync注解将其激活。 4.使用第三方库,如Quartz: 除了使用Spring...
主要介绍了浅谈spring 线程异步执行,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
NULL 博文链接:https://tuozixuan.iteye.com/blog/2329685
主要介绍了详解Spring/Spring boot异步任务编程WebAsyncTask,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
本篇文章主要介绍了Spring5源码解析之Spring中的异步和计划任务,具有一定的参考价值,感兴趣的小伙伴们可以参考一下。
在没有使用spring boot之前,我们的做法是在配置文件中定义一个任务池,然后将@Async注解的任务丢到任务池中去执行,那么在spring boot中,怎么来实现异步任务的调用了,下面通过本文给大家讲解,需要的朋友参考下
【java框架】SpringBoot(4)--SpringBoot实现异步、邮件、定时任务(csdn)————程序
在业务处理中,有些业务使用异步的方式更为合理,这篇文章主要介绍了Spring中@Async注解执行异步任务的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
本篇文章主要介绍了Spring Boot @Async 异步任务执行方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
WebAsyncTask WebAsyncTask异步任务样例工程---spring boot/spring
一、Async异步任务 在Java应用中绝大多数情况下默认都是通过同步的方式来实现交互处理的 但在处理与第三方系统交互的时候 容易造成响应迟缓的情况 可以使用多线程来完成此类任务 但其实 在Spring 3.x之后 已经内置了...
主要介绍了Spring Boot Async异步执行任务过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
本篇文章主要介绍了spring boot中使用@Async实现异步调用任务,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
演示异步任务 Spring Boot 的演示异步任务项目 0.0.1-M3 MyAsyncConfigurer - 正确初始化的执行器服务,可以彻底关闭! 0.0.1-M2 MyAsyncConfigurer - 为什么这个执行程序服务没有完全关闭? 链接:
主要介绍了Spring Boot 异步执行方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧