여러 플로우가있는 작업을 실행하려고하면 config.xml을로드 할 때 다음 오류가 발생합니다. 첫 번째 흐름은 식별되는 반면 두 번째 흐름은 식별되지 않았습니다.스프링 배치 작업에서 여러 플로우가 구성된 경우 오류가 발생했습니다.
잘못된 리소스 : 클래스 경로 리소스 [spring/batch/jobs/myAppConfig.xml]; 구성 문제 : 중첩 예외 org.springframework.beans.factory.parsing.BeanDefinitionParsingException하는 요소가 [job1Flow2] 연결할 모든 흐름은 일련의 단계를 가지고 있으며, I는 다양한 작업을
되는 단계들의 다양한 조합 필요합니다. 그래서 단계를 흐름으로 구현 한 다음 흐름을 다시 사용하여 내 작업에 필요한 모든 단계를 수행 할 생각이었습니다.
내 설정 파일 : 나는 두 번째 흐름을 언급하고 작업을 실행하는 경우
<batch:job id="job1" parent="parentJob">
<batch:flow parent="MyFlow1" id="job1Flow1"/>
<batch:flow parent="MyFlow2" id="job1Flow2"/>
</batch:job>
<batch:flow id="MyFlow1">
<batch:step id="step1" next="step2" parent="parentStep">
<batch:tasklet ref="bean1"/>
</batch:step>
<batch:step id="step2" parent="parentStep">
<batch:tasklet ref="bean2"/>
</batch:step>
</batch:flow>
<batch:flow id="MyFlow2">
<batch:step id="step3" next="step4" parent="parentStep">
<batch:tasklet ref="bean3"/>
</batch:step>
<batch:step id="step4" parent="parentStep">
<batch:tasklet ref="bean4"/>
</batch:step>
</batch:flow>
성공적으로 실행됩니다. 흐름이나 다른 방법으로 내 작업을 완료 할 수있는 방법이 있다면 알려주십시오.