1. 26 Feb, 2017 1 commit
  2. 24 Feb, 2017 1 commit
    • Stephane Nicoll's avatar
      Avoid exposing several javax.validaton.Validator beans · 4aa99b95
      Stephane Nicoll authored
      This commit makes sure that the Spring `Validator` used by the MVC
      layer doesn't expose a JSR-303 contract, if any.
      
      The default implementation of the `mvcValidator` is
      `LocalValidatorFactoryBean`. While this object is exposed as a Spring
      `Validator` only, its runtime capabilities expose that contract as well
      as the standard `Validator` and `ValidatorFactory` ones.
      
      Concretely, if an auto-configuration is checking if a
      `javax.validation.Validator` bean is missing, the condition will match
      since we only know about "advertized types": beans haven't been created
      yet so we can't inspect their runtime capabilities. Since the condition
      match, we will auto-configure a bean. At runtime though, we're no longer
      ale to inject a `javax.validation.Validator` by type since two candidates
      are available.
      
      This commit introduces `SpringValidatorAdapterWrapper`, a wrapper class
      on any `SpringValidatorAdapter` (`LocalValidatorFactoryBean` being one of
      the available implementations) that only exposes the Spring contract.
      
      Also, if a `javax.validation.Validator` bean is available, we will use it
      for the MVC layer, rather than creating a new one.
      
      Closes gh-8223
      4aa99b95
  3. 22 Feb, 2017 25 commits
  4. 21 Feb, 2017 4 commits
  5. 20 Feb, 2017 6 commits
  6. 19 Feb, 2017 2 commits
  7. 17 Feb, 2017 1 commit