弹簧批处理与弹簧数据JPA使用RepositoryItemReader和Repository Item writer

时间:2017-08-04 16:20:55

标签: spring spring-boot spring-data-jpa spring-batch

spring spring with spring data JPA using RepositoryItemReader and Repository Item writer。

我没有在网上看到任何示例实现,请抛出一些亮点或示例..代码链接

1 个答案:

答案 0 :(得分:0)

RepositoryItemReader repositoryReport = new RepositoryItemReader();         repositoryReport.setRepository(memberDemoGraphicsRepository); //存储库类refferance

    repositoryReport.setMethodName("getMemberDemoGraphicByGroupID");//repository method
    List<Long> groupIDs = groupDemogrRepository.getValidGroups();
    for (Long id : groupIDs) {
        List<Long> parameters = new ArrayList<>()   ;
        parameters.add(id);
        setAgrguments(parameters);
    }

    repositoryReport.setArguments(getAgrguments());// Mehtod Arguments