Skip to content

Latest commit

 

History

History
 
 

hsweb-concurrent-async-job

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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

<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();
    }