ref 属性を使用してタスクレットを定義すると、すべて問題ありません。
<step id="unzipFiles_010_014" next="verifyXmlSignatures_010_014">
<tasklet ref="unzipTasklet_010_014" />
</step>
ただし、場合によっては、Bean をネストされた Bean として直接定義したい場合があります。
<step id="unzipFiles_010_014" next="verifyXmlSignatures_010_014">
<tasklet>
<bean scope="step" class="some.package.UnZipTasklet">
<property name="file" ref="any.file" />
</bean>
</tasklet>
</step>
今、私は奇妙なエラーを受け取ります:
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'bean'. One of '{"http://
www.springframework.org/schema/batch":chunk,
"http://www.springframework.org/schema/
batch":transaction-attributes,
"http://www.springframework.org/schema/batch":no-rollback-exception-classes,
"http://www.springframework.org/schema/batch":listeners,
"http://www.springframework.org/schema/ beans":bean,
"http://www.springframework.org/schema/beans":ref}' is expected.
豆ですね。
バリデーター ( DefaultJobParametersValidator )を定義するときに、同じ奇妙な動作が発生しました。