Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalValidatorFactoryBean should expose a hook for using a custom ValidationProviderResolver [SPR-14100] #18672

Closed
spring-projects-issues opened this issue Mar 31, 2016 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 31, 2016

Paweł Gesek opened SPR-14100 and commented

Although org.springframework.validation.beanvalidation.LocalValidatorFactoryBean allows injecting a custom provider class to use (providerClass property), it doesn't allow injecting a custom javax.validation.ValidationProviderResolver. Using a custom resolver can for example prevent the need for declaring validation providers in a META-INF/services/javax.validation.spi.ValidationProvider file on the classpath.

The ValidationProviderResolver can be passed to ProviderSpecificBootstrap/GenericBootstrap that's returned by Validation, by using the providerResolver() method before the configuration gets built (javax.validation bootstrapping is currently done in the beginning of the afterPropertiesSet() method of the LocalValidatorFactoryBean).

Allowing the injection of a custom ValidationProviderResolver to use in the javax.validation bootstrap process would allow more flexibility when using the LocalValidatorFactoryBean.


Affects: 3.2.16

Referenced from: commits 739ae8c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants