updated LocalValidatorFactoryBean documentation (SPR-6609)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2841 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller 2010-01-20 11:13:50 +00:00
parent 3606d9c9e4
commit 4a96784b57
1 changed files with 5 additions and 3 deletions

View File

@ -1297,7 +1297,8 @@ public class PersonForm {
<para> <para>
Spring provides full support for the JSR-303 Bean Validation API. Spring provides full support for the JSR-303 Bean Validation API.
This includes convenient support for bootstrapping a JSR-303 implementation as a Spring bean. This includes convenient support for bootstrapping a JSR-303 implementation as a Spring bean.
This allows a <code>javax.validation.Validator</code> to be injected wherever validation is needed in your application. This allows for a <code>javax.validation.ValidatorFactory</code> or <code>javax.validation.Validator</code>
to be injected wherever validation is needed in your application.
</para> </para>
<para> <para>
Use the <classname>LocalValidatorFactoryBean</classname> to configure a default JSR-303 Validator as a Spring bean: Use the <classname>LocalValidatorFactoryBean</classname> to configure a default JSR-303 Validator as a Spring bean:
@ -1312,8 +1313,9 @@ public class PersonForm {
<section id="validation-beanvalidation-spring-inject"> <section id="validation-beanvalidation-spring-inject">
<title>Injecting a Validator</title> <title>Injecting a Validator</title>
<para> <para>
<classname>LocalValidatorFactoryBean</classname> implements both <code>javax.validation.Validator</code> and <code>org.springframework.validation.Validator</code>. <classname>LocalValidatorFactoryBean</classname> implements both <code>javax.validation.ValidatorFactory</code>
You may inject a reference to one of these two interfaces into beans that need to invoke validation logic. and <code>javax.validation.Validator</code>, as well as Spring's <code>org.springframework.validation.Validator</code>.
You may inject a reference to either of these interfaces into beans that need to invoke validation logic.
</para> </para>
<para> <para>
Inject a reference to <code>javax.validation.Validator</code> if you prefer to work with the JSR-303 API directly: Inject a reference to <code>javax.validation.Validator</code> if you prefer to work with the JSR-303 API directly: