We're using Spring and...
Ah, I see. Unfortunately you can't configure the provider resolver to be used by LocalValidatorFactoryBean. In this case you could either create a subclass of LocalValidatorFactoryBean, overriding afterPropertiesSet() to make use of a custom provider resolver or you retrieve the container's ValidatorFactory/Validator like this:
<jee:jndi-lookup id="validatorFactory" jndi-name="java:comp/ValidatorFactory" />
<jee:jndi-lookup id="validator" jndi-name="java:comp/Validator" />
By default, this doesn't make use of Spring's specific message interpolator and constraint validator factory, though (the latter enabling dependency injection in validators). You might configure these in validation.xml if required.
|