Class BeanValidatingItemProcessor<T>
java.lang.Object
org.springframework.batch.item.validator.ValidatingItemProcessor<T>
org.springframework.batch.item.validator.BeanValidatingItemProcessor<T>
- Type Parameters:
T
- type of items to validate
- All Implemented Interfaces:
ItemProcessor<T,
,T> org.springframework.beans.factory.InitializingBean
A
ValidatingItemProcessor
that uses the Bean Validation API (JSR-303) to
validate items.- Since:
- 4.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorDescriptionCreate a new instance ofBeanValidatingItemProcessor
with the default configuration.BeanValidatingItemProcessor
(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean localValidatorFactoryBean) Create a new instance ofBeanValidatingItemProcessor
. -
Method Summary
Methods inherited from class org.springframework.batch.item.validator.ValidatingItemProcessor
process, setFilter, setValidator
-
Constructor Details
-
BeanValidatingItemProcessor
public BeanValidatingItemProcessor()Create a new instance ofBeanValidatingItemProcessor
with the default configuration. -
BeanValidatingItemProcessor
public BeanValidatingItemProcessor(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean localValidatorFactoryBean) Create a new instance ofBeanValidatingItemProcessor
.- Parameters:
localValidatorFactoryBean
- used to configure the Bean Validation validator
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classValidatingItemProcessor<T>
- Throws:
Exception
-