Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
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?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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;

    }
    }
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda