如何使用Spring Cloud Stream触发任务并传递白名单属性

时间:2018-10-18 10:24:10

标签: spring-cloud-dataflow

我已如下创建流

1.stream创建SampleClaimInjestTask --definition“ triggertask --triggertask.uri = file:// D:/ClaimReportBatch/target/ClaimReportBatch-0.0.1-SNAPSHOT.jar --trigger.fixed-delay = 60- triggertask.environment-properties = spring.datasource.url = jdbc:postgresql:// localhost:5432 / scdf,spring.datasource.username = postgres,spring.datasource.password = postgres | task-launcher-local --authentication-token -url = {http://10.73.122.140:9040/api/authenticate --rest-post-api-url = http://10.73.122.140:9040/api/claim-report-transactions --processed-file-folder = D:/ processed --csv-file-path = D:/ local-files- -json-config-path = D:/远程文件”

2.stream deploy --name SampleClaimInjestTask

3.Stream SampleClaimInjestTask成功部署

4个任务启动器触发任务。但是那些属性未在BatchConfigurationProperties.class中设置

错误日志: 018-10-18 15:32:12.744错误9360 --- [main] o.s.boot.SpringApplication:应用程序启动失败

org.springframework.beans.factory.BeanCreationException:创建在类路径资源[com / ev / fincloud / fdp / ClaimReportBatch / config / ClaimReportBatchConfiguration.class]中定义的名称为'readClaimReportCSVFilesJob'的bean时出错:通过工厂方法实例化Bean失败;嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.batch.core.Job]:工厂方法'readClaimReportCSVFilesJob'引发了异常;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在类路径资源[com / ev / fincloud / fdp / ClaimReportBatch / config / ClaimReportBatchConfiguration.class]中定义的名称为'fileProcessingStep'的bean时出错:通过工厂方法实例化Bean失败;嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.batch.core.Step]:工厂方法'fileProcessingStep'抛出了异常;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在类路径资源[com / ev / fincloud / fdp / ClaimReportBatch / config / ClaimReportBatchConfiguration.class]中定义的名称为“ multiResourceItemReader”的bean时出错:通过工厂方法实例化Bean失败;嵌套异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.batch.item.file.MultiResourceItemReader]:工厂方法'multiResourceItemReader'引发了异常;嵌套的异常是java.lang.NullPointerException     在org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)〜[spring-beans-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]

0 个答案:

没有答案