ねえ、SpringBatchアプリケーションのコンテキストで少し問題が発生しています。ジョブランチャーを通過するjobParametersを確認できるように決定者が必要です。通常のタスクレットの場合、メソッドで@beforeStepを使用して情報を取得します。また、リスナーを使用して、タスクレットが次のように@beforeStepに到達できるようにします。
<batch:step id="verifyDatabase" next="full.incremental.decision">
<batch:tasklet ref="verifyDatabaseTasklet" />
<batch:listeners>
<batch:listener ref="verifyDatabaseTasklet" />
<batch:listener ref="PromotionListener" />
</batch:listeners>
</batch:step>
しかし、私は決断を下して同じことをしたいと思っています。このようなもの:
<batch:decision id="full.incremental.decision" decider="fullIncrementalDecider">
<batch:next on="COMPLETED" to="incrementalUpdate" />
<batch:next on="FAILED" to="fullUpdate" />
<batch:listeners>
<batch:listener ref="full.incremental.decision" />
</batch:listeners>
</batch:decision>
そうすると、このエラーが発生します
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'batch:listeners'. One of '{"http://
www.springframework.org/schema/batch":next, "http://
www.springframework.org/schema/batch":stop, "http://
www.springframework.org/schema/batch":end, "http://
www.springframework.org/schema/batch":fail}' is expected.
これはおそらくリスナーが決定に許可されていないことを意味することを私は知っていますか?あれは正しいですか?とにかく、JobExecutionDeciderでjobParametersに到達できますか?
本当にありがとう