Avoid hard reference to LocalValidatorFactoryBean in <mvc:annotation-driven> parser

Issue: SPR-11272
(cherry picked from commit c48da0d)
This commit is contained in:
Juergen Hoeller
2014-01-03 12:18:49 +01:00
parent 6aabb5f17e
commit 8d1e55d101
2 changed files with 57 additions and 43 deletions

View File

@@ -71,6 +71,9 @@ import org.springframework.util.ReflectionUtils;
* a {@link ValidatorFactory} and call {@link #getValidator()} on it, then {@code #forExecutables}
* on the returned native {@link Validator} reference instead of directly on this class.
*
* <p>This class is also being used by Spring's MVC configuration namespace, in case of the
* {@code javax.validation} API being present but no explicit Validator having been configured.
*
* @author Juergen Hoeller
* @since 3.0
* @see javax.validation.ValidatorFactory
@@ -170,7 +173,7 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter
/**
* Specify resource locations to load XML constraint mapping files from, if any.
*/
public void setMappingLocations(Resource[] mappingLocations) {
public void setMappingLocations(Resource... mappingLocations) {
this.mappingLocations = mappingLocations;
}