В настоящее время мы выполняем миграцию из приложения Spring Batch XML
в приложение Spring Boot 2.2.6.RELEASE
последней версии.
У меня есть приведенный ниже фрагмент XML, который я хочу преобразовать в задание на основе аннотаций. , Я действительно изо всех сил пытаюсь найти эти варианты, поскольку я прошел через https://docs.spring.io/spring-batch/docs/current/reference/html/step.html#taskletStep.
<batch:job id="myJob">
<batch:step id="step1">
<batch:tasklet>
<batch:chunk reader="reader" writer="writer" commit-interval="100" retry-limit="3" skip-limit="3">
<batch:retryable-exception-classes>
<batch:exclude class="org.springframework.dao.PessimisticLockingFailureException"/>
</batch:retryable-exception-classes>
<batch:skippable-exception-classes>
<batch:include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
</batch:skippable-exception-classes>
</batch:chunk>
</batch:tasklet>
</batch:step>
</batch:job>
Другой фрагмент:
<bean id="retryPolicy" class="org.springframework.retry.policy.ExceptionClassifierRetryPolicy">
<property name="policyMap">
<map>
<entry key="org.springframework.dao.ConcurrencyFailureException">
<bean class="org.springframework.batch.retry.policy.SimplreRetryPolicy">
<property name="maxAttempts" value="3" />
</bean>
</entry>
<entry key="org.springframework.dao.DeadlockLoserDataAccessException">
<bean class="org.springframework.batch.retry.policy.SimplreRetryPolicy">
<property name="maxAttempts" value="5" />
</bean>
</entry>
</map>
</property>
</bean>