Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
Is it possible to disable spring batch's skip-limit?

I am looking for a way to disable spring batch's skip-limit, I tried specifying a value of "0" for skip-limit, but is not accepting. Here is my use case:

My batch.xml has skip-limit="${limit_val}"

I want to set ${limit_val} to 0, meaning fail on any exception by default. On seeing the failure, I can look at the reason and decide if its ok to skip the record. If skippable, I want to be able to override ${limit_val} with a value of, say 1 and re-run the batch.

Any help on how this can be achieved?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Have you tried using skip-policy property? In chunk under step define skip-policy="mySkipPolicy" and then give definition of skipPolicy bean.

Provide skipPolicy bean implementation by implementing SkipPolicy Interface.

    public class MySkipPolicy implements SkipPolicy
    {
    private int limit;
    public boolean shouldSkip(final Throwable t, final int skipCount) throws SkipLimitExceededException
    {
    return true or false based on skipCount;

    }
    }
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda