Spring Batch: how to pass jobParameters to a custom bean?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Im still studying spring batch and came across a scenario where i need to pass a jobParameter to a custom bean. The job parameter contains a path of a file. Here is how my context looks like: <bean id="myBean" class=".....MyBean"> <property name="path" value="file:#{jobParameters['PATH'}/fileName"/> </bean> This is already included in a step scope from a reader that is not included here. The question is. When the class is instantiated, the value passed to the bean is "file:#{jobParameters['PATH'}/fileName" instead the value of jobParameter