Files
hsweb-framework/hsweb-concurrent/hsweb-concurrent-async-job
2018-06-02 00:14:40 +08:00
..
2017-12-21 00:49:27 +08:00
2018-06-02 00:14:40 +08:00
2017-09-01 15:40:11 +08:00

异步任务工具,支持多线程事务


<dependency>
    <groupId>org.hswebframework.web</groupId>
    <artifactId>hsweb-concurrent-async-job</artifactId>
    <version>${project.verion}</version>
</dependency>
   @Autowired
    private AsyncJobService asyncJobService;
    
    
    public void testJob(){
      List<Object> results=  asyncJobService.batch()
                    .submit(()->...) //提交job
                    .submit(()->...) //提交另外一个job
                    .submit(()->...,true) //提交支持事务的job
                    .getResult();
    }