【发布时间】:2020-07-14 22:00:53
【问题描述】:
我目前正在处理 JSR 批处理作业。我尝试在我的批处理构造函数中注入传入参数。
@Inject
public MyBatchLet(@BatchProperty(name="prop1") String prop1){
this.myProperty = prop1;
}
这会引发依赖异常。
Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: : No qualifying bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.batch.api.BatchProperty(name=)};
我在这里迷路了,如果能帮助我理解这种行为,我将不胜感激。
【问题讨论】:
标签: java spring-batch batch-processing jsr352