filesTobeParsedHolder包含一个基于该键的映射,它将返回一个arrayList对象,该对象是文件名列表。 上面的spring批量配置在windows上工作正常。但是相同的代码在unix / linux上不起作用并显示以下错误:
ERROR 2013-10-17 03:45:19,851 [SimpleAsyncTaskExecutor-17] AbstractStep - Encountered an error executing the step
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lazyBindingProxy.generalProfilingLogMRI#sys
init' defined in class path resource [GeneralExtractJobs/generalExtractJob.xml]: Initialization of bean failed; nested exception is
java.lang.IllegalStateException: Cannot bind to placeholder: filesTobeParsedHolder.get(stepExecutionContext['date.as.yyyyMMdd'].co
ncat('.').concat(stepExecutionContext['instance']))
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFac
tory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.ja
va:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFacto
ry.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:302)
at org.springframework.batch.core.scope.StepScope.get(StepScope.java:150)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.batch.core.scope.util.PlaceholderTargetSource.getTarget(PlaceholderTargetSource.java:185)
<bean id="generalProfilingLogMRI" class="org.springframework.batch.item.file.MultiResourceItemReader" scope="step">
<property name="resources" value="#{filesTobeParsedHolder.get(stepExecutionContext['date.as.yyyyMMdd'].concat('.').concat(stepExecutionContext['instance']))}"/>
<property name="delegate" ref="generalProfilingLogFileItemReader" />
</bean>